From 127458ed175c5aeac8dee7f09d23fae4c8928eb7 Mon Sep 17 00:00:00 2001 From: reduz Date: Sat, 7 Nov 2020 19:33:38 -0300 Subject: Reorganized core/ directory, it was too fatty already -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code --- core/SCsub | 9 +- core/array.cpp | 556 --- core/array.h | 118 - core/bind/SCsub | 5 - core/bind/core_bind.cpp | 2612 ----------- core/bind/core_bind.h | 770 --- core/binder_common.h | 657 --- core/callable.cpp | 393 -- core/callable.h | 167 - core/callable_bind.cpp | 193 - core/callable_bind.h | 85 - core/callable_method_pointer.cpp | 93 - core/callable_method_pointer.h | 244 - core/class_db.cpp | 1571 ------- core/class_db.h | 427 -- core/color.cpp | 561 --- core/color.h | 253 - core/color_names.inc | 155 - core/command_queue_mt.cpp | 112 - core/command_queue_mt.h | 529 --- core/compressed_translation.cpp | 288 -- core/compressed_translation.h | 89 - core/config/SCsub | 7 + core/config/engine.cpp | 221 + core/config/engine.h | 134 + core/config/project_settings.cpp | 1268 +++++ core/config/project_settings.h | 185 + core/container_type_validate.h | 126 - core/core_bind.cpp | 2612 +++++++++++ core/core_bind.h | 770 +++ core/core_constants.cpp | 690 +++ core/core_constants.h | 45 + core/core_string_names.h | 2 +- core/cowdata.h | 372 -- core/crypto/aes_context.h | 2 +- core/crypto/crypto.cpp | 2 +- core/crypto/crypto.h | 4 +- core/crypto/crypto_core.h | 2 +- core/crypto/hashing_context.h | 2 +- core/debugger/debugger_marshalls.h | 2 +- core/debugger/engine_debugger.h | 12 +- core/debugger/local_debugger.h | 4 +- core/debugger/remote_debugger.cpp | 4 +- core/debugger/remote_debugger.h | 8 +- core/debugger/remote_debugger_peer.cpp | 2 +- core/debugger/remote_debugger_peer.h | 4 +- core/debugger/script_debugger.h | 10 +- core/dictionary.cpp | 273 -- core/dictionary.h | 91 - core/engine.cpp | 221 - core/engine.h | 134 - core/error/SCsub | 7 + core/error/error_list.h | 93 + core/error/error_macros.cpp | 109 + core/error/error_macros.h | 626 +++ core/error_list.h | 93 - core/error_macros.cpp | 109 - core/error_macros.h | 626 --- core/func_ref.cpp | 101 - core/func_ref.h | 55 - core/global_constants.cpp | 690 --- core/global_constants.h | 45 - core/hash_map.h | 551 --- core/hashfuncs.h | 174 - core/image.cpp | 3608 -------------- core/image.h | 417 -- core/input/input.cpp | 2 +- core/input/input.h | 2 +- core/input/input_event.h | 4 +- core/input/input_map.cpp | 2 +- core/input/input_map.h | 2 +- core/int_types.h | 62 - core/io/compression.cpp | 2 +- core/io/compression.h | 2 +- core/io/config_file.cpp | 2 +- core/io/config_file.h | 6 +- core/io/dtls_server.cpp | 2 +- core/io/file_access_buffered.cpp | 2 +- core/io/file_access_buffered.h | 2 +- core/io/file_access_compressed.cpp | 2 +- core/io/file_access_encrypted.cpp | 4 +- core/io/file_access_memory.cpp | 4 +- core/io/file_access_network.cpp | 2 +- core/io/file_access_pack.cpp | 2 +- core/io/file_access_pack.h | 6 +- core/io/file_access_zip.h | 2 +- core/io/http_client.h | 2 +- core/io/image.cpp | 3608 ++++++++++++++ core/io/image.h | 417 ++ core/io/image_loader.cpp | 2 +- core/io/image_loader.h | 6 +- core/io/ip.cpp | 2 +- core/io/ip_address.h | 2 +- core/io/json.cpp | 2 +- core/io/json.h | 2 +- core/io/logger.cpp | 2 +- core/io/logger.h | 4 +- core/io/marshalls.cpp | 4 +- core/io/marshalls.h | 4 +- core/io/multiplayer_api.h | 2 +- core/io/net_socket.h | 2 +- core/io/packed_data_container.cpp | 395 ++ core/io/packed_data_container.h | 105 + core/io/packet_peer.cpp | 2 +- core/io/packet_peer.h | 4 +- core/io/packet_peer_dtls.cpp | 2 +- core/io/pck_packer.h | 2 +- core/io/resource.cpp | 536 +++ core/io/resource.h | 172 + core/io/resource_format_binary.cpp | 4 +- core/io/resource_importer.cpp | 4 +- core/io/resource_loader.cpp | 8 +- core/io/resource_loader.h | 2 +- core/io/resource_saver.cpp | 4 +- core/io/resource_saver.h | 2 +- core/io/stream_peer.h | 2 +- core/io/stream_peer_ssl.cpp | 2 +- core/io/stream_peer_tcp.cpp | 2 +- core/io/translation_loader_po.cpp | 4 +- core/io/translation_loader_po.h | 2 +- core/io/xml_parser.cpp | 2 +- core/io/xml_parser.h | 6 +- core/list.h | 688 --- core/local_vector.h | 246 - core/map.h | 668 --- core/math/a_star.cpp | 2 +- core/math/a_star.h | 4 +- core/math/aabb.cpp | 4 +- core/math/basis.cpp | 2 +- core/math/camera_matrix.cpp | 2 +- core/math/color.cpp | 580 +++ core/math/color.h | 256 + core/math/color_names.inc | 160 + core/math/delaunay_3d.h | 10 +- core/math/disjoint_set.h | 4 +- core/math/expression.cpp | 33 +- core/math/expression.h | 3 +- core/math/geometry_2d.h | 4 +- core/math/geometry_3d.cpp | 2 +- core/math/geometry_3d.h | 4 +- core/math/math_fieldwise.h | 2 +- core/math/math_funcs.cpp | 2 +- core/math/octree.h | 8 +- core/math/plane.cpp | 2 +- core/math/quat.cpp | 2 +- core/math/quat.h | 2 +- core/math/quick_hull.cpp | 2 +- core/math/quick_hull.h | 4 +- core/math/random_number_generator.h | 2 +- core/math/transform.cpp | 2 +- core/math/triangle_mesh.cpp | 2 +- core/math/triangle_mesh.h | 2 +- core/math/vector2.h | 2 +- core/math/vector3.h | 2 +- core/math/vector3i.h | 2 +- core/message_queue.cpp | 374 -- core/message_queue.h | 98 - core/method_bind.cpp | 110 - core/method_bind.h | 591 --- core/method_ptrcall.h | 453 -- core/node_path.cpp | 429 -- core/node_path.h | 99 - core/oa_hash_map.h | 399 -- core/object.cpp | 1983 -------- core/object.h | 815 ---- core/object/SCsub | 7 + core/object/callable_method_pointer.cpp | 93 + core/object/callable_method_pointer.h | 244 + core/object/class_db.cpp | 1571 +++++++ core/object/class_db.h | 427 ++ core/object/message_queue.cpp | 374 ++ core/object/message_queue.h | 98 + core/object/method_bind.cpp | 110 + core/object/method_bind.h | 591 +++ core/object/object.cpp | 1983 ++++++++ core/object/object.h | 815 ++++ core/object/object_id.h | 63 + core/object/reference.cpp | 132 + core/object/reference.h | 301 ++ core/object/script_language.cpp | 598 +++ core/object/script_language.h | 460 ++ core/object/undo_redo.cpp | 520 +++ core/object/undo_redo.h | 135 + core/object_id.h | 63 - core/ordered_hash_map.h | 299 -- core/os/dir_access.cpp | 2 +- core/os/dir_access.h | 2 +- core/os/file_access.cpp | 2 +- core/os/file_access.h | 2 +- core/os/keyboard.h | 2 +- core/os/main_loop.cpp | 2 +- core/os/main_loop.h | 4 +- core/os/memory.cpp | 4 +- core/os/memory.h | 4 +- core/os/midi_driver.h | 2 +- core/os/mutex.h | 2 +- core/os/os.cpp | 2 +- core/os/os.h | 10 +- core/os/pool_allocator.cpp | 596 +++ core/os/pool_allocator.h | 150 + core/os/rw_lock.cpp | 2 +- core/os/rw_lock.h | 2 +- core/os/semaphore.h | 2 +- core/os/spin_lock.h | 51 + core/os/thread.h | 2 +- core/os/threaded_array_processor.h | 2 +- core/packed_data_container.cpp | 395 -- core/packed_data_container.h | 105 - core/pair.h | 67 - core/pool_allocator.cpp | 596 --- core/pool_allocator.h | 150 - core/print_string.cpp | 110 - core/print_string.h | 58 - core/project_settings.cpp | 1268 ----- core/project_settings.h | 185 - core/reference.cpp | 132 - core/reference.h | 301 -- core/register_core_types.cpp | 18 +- core/resource.cpp | 536 --- core/resource.h | 172 - core/rid.h | 69 - core/rid_owner.cpp | 33 - core/rid_owner.h | 404 -- core/ring_buffer.h | 220 - core/safe_refcount.cpp | 161 - core/safe_refcount.h | 203 - core/script_language.cpp | 598 --- core/script_language.h | 460 -- core/self_list.h | 139 - core/set.h | 619 --- core/simple_type.h | 56 - core/sort_array.h | 321 -- core/spin_lock.h | 51 - core/string/SCsub | 7 + core/string/compressed_translation.cpp | 288 ++ core/string/compressed_translation.h | 89 + core/string/node_path.cpp | 429 ++ core/string/node_path.h | 99 + core/string/print_string.cpp | 110 + core/string/print_string.h | 58 + core/string/string_buffer.h | 162 + core/string/string_builder.cpp | 99 + core/string/string_builder.h | 84 + core/string/string_name.cpp | 393 ++ core/string/string_name.h | 165 + core/string/translation.cpp | 1303 ++++++ core/string/translation.h | 129 + core/string/translation_po.cpp | 312 ++ core/string/translation_po.h | 92 + core/string/ucaps.h | 1415 ++++++ core/string/ustring.cpp | 4899 ++++++++++++++++++++ core/string/ustring.h | 539 +++ core/string_buffer.h | 162 - core/string_builder.cpp | 99 - core/string_builder.h | 84 - core/string_name.cpp | 393 -- core/string_name.h | 165 - core/templates/SCsub | 7 + core/templates/command_queue_mt.cpp | 112 + core/templates/command_queue_mt.h | 529 +++ core/templates/cowdata.h | 372 ++ core/templates/hash_map.h | 551 +++ core/templates/hashfuncs.h | 174 + core/templates/list.h | 688 +++ core/templates/local_vector.h | 246 + core/templates/map.h | 668 +++ core/templates/oa_hash_map.h | 399 ++ core/templates/ordered_hash_map.h | 299 ++ core/templates/pair.h | 67 + core/templates/rid.h | 69 + core/templates/rid_owner.cpp | 33 + core/templates/rid_owner.h | 404 ++ core/templates/ring_buffer.h | 220 + core/templates/safe_refcount.cpp | 161 + core/templates/safe_refcount.h | 203 + core/templates/self_list.h | 139 + core/templates/set.h | 619 +++ core/templates/simple_type.h | 56 + core/templates/sort_array.h | 321 ++ core/templates/thread_work_pool.cpp | 81 + core/templates/thread_work_pool.h | 133 + core/templates/vector.h | 222 + core/templates/vmap.h | 202 + core/templates/vset.h | 142 + core/thread_work_pool.cpp | 81 - core/thread_work_pool.h | 133 - core/translation.cpp | 1303 ------ core/translation.h | 129 - core/translation_po.cpp | 312 -- core/translation_po.h | 92 - core/type_info.h | 270 -- core/typed_array.h | 227 - core/typedefs.h | 4 +- core/ucaps.h | 1415 ------ core/undo_redo.cpp | 520 --- core/undo_redo.h | 135 - core/ustring.cpp | 4899 -------------------- core/ustring.h | 539 --- core/variant.cpp | 3521 -------------- core/variant.h | 613 --- core/variant/SCsub | 7 + core/variant/array.cpp | 556 +++ core/variant/array.h | 118 + core/variant/binder_common.h | 657 +++ core/variant/callable.cpp | 393 ++ core/variant/callable.h | 167 + core/variant/callable_bind.cpp | 193 + core/variant/callable_bind.h | 85 + core/variant/container_type_validate.h | 126 + core/variant/dictionary.cpp | 273 ++ core/variant/dictionary.h | 91 + core/variant/method_ptrcall.h | 453 ++ core/variant/type_info.h | 270 ++ core/variant/typed_array.h | 227 + core/variant/variant.cpp | 3521 ++++++++++++++ core/variant/variant.h | 613 +++ core/variant/variant_call.cpp | 2089 +++++++++ core/variant/variant_internal.h | 652 +++ core/variant/variant_op.cpp | 2135 +++++++++ core/variant/variant_parser.cpp | 1803 +++++++ core/variant/variant_parser.h | 148 + core/variant/variant_setget.cpp | 2587 +++++++++++ core/variant_call.cpp | 2090 --------- core/variant_internal.h | 652 --- core/variant_op.cpp | 2135 --------- core/variant_parser.cpp | 1803 ------- core/variant_parser.h | 148 - core/variant_setget.cpp | 2587 ----------- core/vector.h | 222 - core/vmap.h | 202 - core/vset.h | 142 - drivers/alsa/audio_driver_alsa.cpp | 2 +- drivers/alsamidi/midi_driver_alsamidi.cpp | 2 +- drivers/alsamidi/midi_driver_alsamidi.h | 2 +- drivers/coreaudio/audio_driver_coreaudio.cpp | 2 +- drivers/coremidi/midi_driver_coremidi.cpp | 2 +- drivers/coremidi/midi_driver_coremidi.h | 2 +- drivers/dummy/rasterizer_dummy.h | 4 +- drivers/dummy/texture_loader_dummy.cpp | 2 +- drivers/png/image_loader_png.cpp | 2 +- drivers/png/png_driver_common.h | 2 +- drivers/png/resource_saver_png.cpp | 2 +- drivers/png/resource_saver_png.h | 2 +- drivers/pulseaudio/audio_driver_pulseaudio.cpp | 2 +- drivers/unix/dir_access_unix.cpp | 4 +- drivers/unix/file_access_unix.cpp | 2 +- drivers/unix/os_unix.cpp | 2 +- drivers/unix/rw_lock_posix.cpp | 2 +- drivers/unix/syslog_logger.cpp | 2 +- drivers/unix/thread_posix.cpp | 4 +- drivers/vulkan/rendering_device_vulkan.cpp | 4 +- drivers/vulkan/rendering_device_vulkan.h | 4 +- drivers/vulkan/vulkan_context.cpp | 6 +- drivers/vulkan/vulkan_context.h | 8 +- drivers/wasapi/audio_driver_wasapi.cpp | 2 +- drivers/windows/dir_access_windows.cpp | 2 +- drivers/windows/file_access_windows.cpp | 2 +- drivers/windows/rw_lock_windows.cpp | 2 +- drivers/windows/thread_windows.h | 2 +- drivers/winmidi/midi_driver_winmidi.cpp | 2 +- drivers/winmidi/midi_driver_winmidi.h | 2 +- drivers/xaudio2/audio_driver_xaudio2.cpp | 2 +- editor/code_editor.cpp | 2 +- editor/connections_dialog.cpp | 2 +- editor/connections_dialog.h | 2 +- editor/create_dialog.cpp | 2 +- editor/debugger/editor_debugger_server.h | 2 +- editor/debugger/editor_performance_profiler.h | 4 +- editor/debugger/script_editor_debugger.cpp | 4 +- editor/doc_data.cpp | 18 +- editor/doc_data.h | 4 +- editor/editor_atlas_packer.h | 2 +- editor/editor_autoload_settings.cpp | 8 +- editor/editor_data.cpp | 2 +- editor/editor_data.h | 6 +- editor/editor_export.cpp | 4 +- editor/editor_export.h | 2 +- editor/editor_feature_profile.h | 2 +- editor/editor_file_dialog.cpp | 2 +- editor/editor_file_system.cpp | 4 +- editor/editor_file_system.h | 2 +- editor/editor_help_search.h | 2 +- editor/editor_layouts_dialog.cpp | 2 +- editor/editor_node.cpp | 12 +- editor/editor_plugin.h | 2 +- editor/editor_plugin_settings.cpp | 2 +- editor/editor_plugin_settings.h | 2 +- editor/editor_resource_preview.cpp | 4 +- editor/editor_run.cpp | 2 +- editor/editor_run_script.h | 2 +- editor/editor_settings.cpp | 2 +- editor/editor_settings.h | 6 +- editor/editor_translation_parser.cpp | 6 +- editor/editor_translation_parser.h | 4 +- editor/editor_vcs_interface.h | 4 +- editor/fileserver/editor_file_server.h | 2 +- editor/filesystem_dock.cpp | 4 +- editor/find_in_files.h | 2 +- editor/groups_editor.h | 2 +- editor/import/collada.h | 4 +- editor/import/editor_import_plugin.cpp | 2 +- editor/import/resource_importer_bitmask.cpp | 2 +- editor/import/resource_importer_bitmask.h | 2 +- .../import/resource_importer_csv_translation.cpp | 4 +- editor/import/resource_importer_image.h | 2 +- editor/import/resource_importer_layered_texture.h | 2 +- editor/import/resource_importer_texture.h | 2 +- editor/import/resource_importer_texture_atlas.h | 2 +- editor/input_map_editor.h | 2 +- editor/localization_editor.cpp | 2 +- editor/localization_editor.h | 2 +- editor/plugins/animation_blend_space_2d_editor.cpp | 2 +- .../plugins/animation_blend_tree_editor_plugin.cpp | 2 +- editor/plugins/animation_player_editor_plugin.cpp | 2 +- editor/plugins/animation_state_machine_editor.cpp | 2 +- editor/plugins/animation_tree_editor_plugin.cpp | 2 +- editor/plugins/audio_stream_editor_plugin.cpp | 2 +- editor/plugins/canvas_item_editor_plugin.cpp | 4 +- editor/plugins/node_3d_editor_plugin.cpp | 6 +- .../plugins/resource_preloader_editor_plugin.cpp | 2 +- editor/plugins/script_editor_plugin.cpp | 2 +- editor/plugins/script_editor_plugin.h | 2 +- editor/plugins/sprite_frames_editor_plugin.cpp | 2 +- editor/plugins/texture_3d_editor_plugin.cpp | 2 +- editor/plugins/texture_editor_plugin.cpp | 2 +- editor/plugins/texture_layered_editor_plugin.cpp | 2 +- editor/plugins/version_control_editor_plugin.cpp | 2 +- editor/plugins/visual_shader_editor_plugin.cpp | 2 +- editor/pot_generator.cpp | 4 +- editor/pot_generator.h | 4 +- editor/progress_dialog.cpp | 2 +- editor/project_export.cpp | 4 +- editor/project_manager.cpp | 2 +- editor/project_settings_editor.cpp | 2 +- editor/project_settings_editor.h | 2 +- editor/property_editor.cpp | 8 +- editor/pvrtc_compress.h | 2 +- editor/quick_open.h | 2 +- editor/rename_dialog.cpp | 2 +- editor/rename_dialog.h | 2 +- editor/reparent_dialog.cpp | 2 +- editor/scene_tree_dock.cpp | 2 +- editor/scene_tree_editor.cpp | 4 +- editor/scene_tree_editor.h | 2 +- editor/script_create_dialog.cpp | 6 +- editor/settings_config_dialog.cpp | 2 +- editor/shader_globals_editor.h | 2 +- main/main.cpp | 6 +- main/main.h | 2 +- main/main_timer_sync.h | 2 +- main/performance.cpp | 2 +- main/performance.h | 4 +- modules/assimp/editor_scene_importer_assimp.h | 4 +- modules/assimp/import_state.h | 4 +- modules/bullet/area_bullet.h | 2 +- modules/bullet/bullet_physics_server.cpp | 6 +- modules/bullet/bullet_physics_server.h | 4 +- modules/bullet/collision_object_bullet.h | 4 +- modules/bullet/godot_collision_dispatcher.h | 2 +- modules/bullet/register_types.cpp | 4 +- modules/bullet/rid_bullet.h | 2 +- modules/bullet/shape_bullet.cpp | 2 +- modules/bullet/shape_bullet.h | 2 +- modules/bullet/space_bullet.cpp | 4 +- modules/bullet/space_bullet.h | 4 +- modules/csg/csg.cpp | 2 +- modules/csg/csg.h | 10 +- modules/cvtt/image_compress_cvtt.cpp | 2 +- modules/cvtt/image_compress_cvtt.h | 2 +- modules/denoise/lightmap_denoiser.h | 2 +- modules/denoise/register_types.cpp | 2 +- modules/enet/register_types.cpp | 2 +- modules/etc/image_etc.cpp | 4 +- modules/gdnative/gdnative.cpp | 4 +- modules/gdnative/gdnative.h | 2 +- modules/gdnative/gdnative/aabb.cpp | 2 +- modules/gdnative/gdnative/array.cpp | 6 +- modules/gdnative/gdnative/basis.cpp | 2 +- modules/gdnative/gdnative/callable.cpp | 6 +- modules/gdnative/gdnative/color.cpp | 4 +- modules/gdnative/gdnative/dictionary.cpp | 6 +- modules/gdnative/gdnative/gdnative.cpp | 16 +- modules/gdnative/gdnative/node_path.cpp | 4 +- modules/gdnative/gdnative/packed_arrays.cpp | 6 +- modules/gdnative/gdnative/plane.cpp | 2 +- modules/gdnative/gdnative/quat.cpp | 2 +- modules/gdnative/gdnative/rect2.cpp | 2 +- modules/gdnative/gdnative/rid.cpp | 6 +- modules/gdnative/gdnative/string.cpp | 6 +- modules/gdnative/gdnative/string_name.cpp | 4 +- modules/gdnative/gdnative/transform.cpp | 2 +- modules/gdnative/gdnative/transform2d.cpp | 2 +- modules/gdnative/gdnative/variant.cpp | 4 +- modules/gdnative/gdnative/vector2.cpp | 2 +- modules/gdnative/gdnative/vector3.cpp | 4 +- modules/gdnative/nativescript/api_generator.cpp | 20 +- modules/gdnative/nativescript/api_generator.h | 2 +- .../gdnative/nativescript/godot_nativescript.cpp | 10 +- modules/gdnative/nativescript/nativescript.cpp | 4 +- modules/gdnative/nativescript/nativescript.h | 10 +- .../pluginscript/pluginscript_instance.cpp | 2 +- .../gdnative/pluginscript/pluginscript_instance.h | 2 +- .../pluginscript/pluginscript_language.cpp | 2 +- .../gdnative/pluginscript/pluginscript_language.h | 6 +- .../gdnative/pluginscript/pluginscript_loader.h | 2 +- .../gdnative/pluginscript/pluginscript_script.h | 2 +- modules/gdnative/pluginscript/register_types.cpp | 2 +- modules/gdnative/register_types.cpp | 4 +- modules/gdnative/videodecoder/register_types.cpp | 2 +- .../videodecoder/video_stream_gdnative.cpp | 2 +- modules/gdnavigation/gd_navigation_server.h | 4 +- modules/gdnavigation/nav_rid.h | 2 +- modules/gdnavigation/register_types.cpp | 2 +- modules/gdnavigation/rvo_agent.h | 2 +- .../editor/gdscript_translation_parser_plugin.h | 2 +- modules/gdscript/gdscript.cpp | 10 +- modules/gdscript/gdscript.h | 2 +- modules/gdscript/gdscript_analyzer.cpp | 8 +- modules/gdscript/gdscript_analyzer.h | 6 +- modules/gdscript/gdscript_cache.cpp | 2 +- modules/gdscript/gdscript_cache.h | 6 +- modules/gdscript/gdscript_codegen.h | 4 +- modules/gdscript/gdscript_compiler.h | 2 +- modules/gdscript/gdscript_editor.cpp | 16 +- modules/gdscript/gdscript_function.cpp | 2 +- modules/gdscript/gdscript_function.h | 12 +- modules/gdscript/gdscript_functions.cpp | 40 +- modules/gdscript/gdscript_functions.h | 3 +- modules/gdscript/gdscript_parser.cpp | 4 +- modules/gdscript/gdscript_parser.h | 22 +- modules/gdscript/gdscript_tokenizer.cpp | 2 +- modules/gdscript/gdscript_tokenizer.h | 8 +- modules/gdscript/gdscript_warning.cpp | 2 +- modules/gdscript/gdscript_warning.h | 4 +- .../language_server/gdscript_extend_parser.h | 2 +- .../language_server/gdscript_language_protocol.cpp | 2 +- .../language_server/gdscript_text_document.h | 2 +- .../language_server/gdscript_workspace.cpp | 4 +- .../gdscript/language_server/gdscript_workspace.h | 2 +- modules/gdscript/language_server/lsp.hpp | 4 +- modules/gdscript/register_types.cpp | 2 +- modules/gdscript/tests/test_gdscript.cpp | 4 +- modules/gridmap/grid_map.cpp | 2 +- modules/gridmap/register_types.cpp | 2 +- modules/hdr/image_loader_hdr.cpp | 2 +- modules/jpg/image_loader_jpegd.cpp | 2 +- modules/jsonrpc/jsonrpc.h | 4 +- modules/jsonrpc/register_types.cpp | 2 +- modules/lightmapper_rd/lightmapper_rd.cpp | 2 +- modules/lightmapper_rd/lightmapper_rd.h | 2 +- modules/lightmapper_rd/register_types.cpp | 2 +- modules/mbedtls/crypto_mbedtls.cpp | 4 +- modules/mbedtls/crypto_mbedtls.h | 2 +- modules/mbedtls/ssl_context_mbedtls.h | 2 +- modules/mono/class_db_api_json.cpp | 2 +- modules/mono/class_db_api_json.h | 8 +- modules/mono/csharp_script.cpp | 2 +- modules/mono/csharp_script.h | 4 +- modules/mono/editor/bindings_generator.cpp | 14 +- modules/mono/editor/bindings_generator.h | 6 +- modules/mono/editor/code_completion.cpp | 2 +- modules/mono/editor/code_completion.h | 4 +- modules/mono/editor/godotsharp_export.cpp | 2 +- modules/mono/editor/godotsharp_export.h | 6 +- modules/mono/editor/script_class_parser.cpp | 2 +- modules/mono/editor/script_class_parser.h | 6 +- modules/mono/glue/base_object_glue.cpp | 6 +- modules/mono/glue/collections_glue.cpp | 2 +- modules/mono/glue/gd_glue.cpp | 8 +- modules/mono/glue/glue_header.h | 16 +- modules/mono/glue/nodepath_glue.cpp | 4 +- modules/mono/glue/rid_glue.cpp | 6 +- modules/mono/glue/scene_tree_glue.cpp | 6 +- modules/mono/glue/string_glue.cpp | 6 +- modules/mono/glue/string_name_glue.cpp | 4 +- modules/mono/godotsharp_dirs.cpp | 2 +- modules/mono/godotsharp_dirs.h | 2 +- modules/mono/managed_callable.h | 4 +- modules/mono/mono_gc_handle.h | 2 +- modules/mono/mono_gd/android_mono_config.h | 2 +- modules/mono/mono_gd/gd_mono.cpp | 2 +- modules/mono/mono_gd/gd_mono_assembly.cpp | 4 +- modules/mono/mono_gd/gd_mono_assembly.h | 6 +- modules/mono/mono_gd/gd_mono_class.h | 4 +- modules/mono/mono_gd/gd_mono_header.h | 2 +- modules/mono/mono_gd/gd_mono_internals.h | 2 +- modules/mono/mono_gd/gd_mono_marshal.h | 2 +- modules/mono/mono_gd/gd_mono_utils.cpp | 2 +- modules/mono/mono_gd/gd_mono_utils.h | 4 +- modules/mono/mono_gd/support/android_support.cpp | 2 +- modules/mono/mono_gd/support/android_support.h | 2 +- modules/mono/mono_gd/support/ios_support.h | 2 +- modules/mono/register_types.cpp | 2 +- modules/mono/signal_awaiter_utils.h | 2 +- modules/mono/utils/mono_reg_utils.h | 2 +- modules/mono/utils/osx_utils.cpp | 2 +- modules/mono/utils/osx_utils.h | 2 +- modules/mono/utils/path_utils.cpp | 2 +- modules/mono/utils/path_utils.h | 4 +- modules/mono/utils/string_utils.h | 4 +- modules/opensimplex/noise_texture.h | 4 +- modules/opensimplex/open_simplex_noise.h | 4 +- modules/regex/regex.h | 12 +- modules/regex/register_types.cpp | 2 +- modules/squish/image_compress_squish.h | 2 +- modules/stb_vorbis/register_types.cpp | 2 +- modules/svg/image_loader_svg.h | 2 +- modules/tga/image_loader_tga.cpp | 4 +- modules/theora/video_stream_theora.cpp | 2 +- modules/theora/video_stream_theora.h | 2 +- modules/tinyexr/image_loader_tinyexr.cpp | 2 +- modules/upnp/register_types.cpp | 2 +- modules/upnp/upnp.h | 2 +- modules/upnp/upnp_device.h | 2 +- modules/visual_script/register_types.cpp | 2 +- modules/visual_script/visual_script.cpp | 2 +- modules/visual_script/visual_script.h | 2 +- .../visual_script/visual_script_builtin_funcs.cpp | 46 +- .../visual_script/visual_script_builtin_funcs.h | 1 - modules/visual_script/visual_script_editor.cpp | 6 +- .../visual_script/visual_script_flow_control.cpp | 2 +- modules/visual_script/visual_script_func_nodes.cpp | 2 +- modules/visual_script/visual_script_nodes.cpp | 14 +- modules/webm/video_stream_webm.cpp | 2 +- modules/webp/image_loader_webp.cpp | 2 +- modules/webrtc/register_types.cpp | 2 +- modules/webrtc/webrtc_data_channel.cpp | 2 +- .../websocket/editor_debugger_server_websocket.cpp | 2 +- modules/websocket/emws_client.cpp | 2 +- modules/websocket/emws_client.h | 2 +- modules/websocket/emws_peer.h | 4 +- modules/websocket/emws_server.h | 2 +- modules/websocket/packet_buffer.h | 2 +- modules/websocket/register_types.cpp | 4 +- .../websocket/remote_debugger_peer_websocket.cpp | 2 +- modules/websocket/websocket_client.h | 2 +- modules/websocket/websocket_multiplayer_peer.h | 4 +- modules/websocket/websocket_peer.h | 2 +- modules/websocket/websocket_server.h | 2 +- modules/websocket/wsl_client.cpp | 2 +- modules/websocket/wsl_client.h | 2 +- modules/websocket/wsl_peer.h | 4 +- modules/websocket/wsl_server.cpp | 2 +- modules/xatlas_unwrap/register_types.cpp | 2 +- platform/android/api/api.cpp | 2 +- platform/android/api/java_class_wrapper.h | 2 +- platform/android/api/jni_singleton.h | 4 +- platform/android/audio_driver_jandroid.cpp | 2 +- platform/android/dir_access_jandroid.cpp | 2 +- platform/android/display_server_android.cpp | 2 +- platform/android/export/export.cpp | 2 +- platform/android/file_access_android.cpp | 2 +- platform/android/java_godot_io_wrapper.cpp | 2 +- platform/android/java_godot_lib_jni.cpp | 4 +- platform/android/jni_utils.h | 4 +- platform/android/os_android.cpp | 2 +- platform/android/plugin/godot_plugin_config.h | 4 +- platform/android/plugin/godot_plugin_jni.cpp | 6 +- platform/android/string_android.h | 2 +- platform/android/thread_jandroid.cpp | 4 +- platform/iphone/app_delegate.mm | 2 +- platform/iphone/display_layer.mm | 2 +- platform/iphone/display_server_iphone.mm | 2 +- platform/iphone/export/export.cpp | 2 +- platform/iphone/game_center.h | 2 +- platform/iphone/godot_iphone.mm | 2 +- platform/iphone/godot_view.mm | 2 +- platform/iphone/godot_view_gesture_recognizer.mm | 2 +- platform/iphone/godot_view_renderer.mm | 2 +- platform/iphone/icloud.h | 2 +- platform/iphone/in_app_store.h | 2 +- platform/iphone/ios.h | 2 +- platform/iphone/joypad_iphone.mm | 2 +- platform/iphone/os_iphone.mm | 2 +- platform/iphone/view_controller.mm | 2 +- platform/javascript/api/api.cpp | 2 +- platform/javascript/api/javascript_eval.h | 2 +- .../api/javascript_tools_editor_plugin.cpp | 4 +- platform/javascript/audio_driver_javascript.cpp | 2 +- platform/linuxbsd/crash_handler_linuxbsd.cpp | 2 +- platform/linuxbsd/detect_prime_x11.cpp | 4 +- platform/linuxbsd/display_server_x11.cpp | 4 +- platform/linuxbsd/display_server_x11.h | 2 +- platform/osx/context_gl_osx.h | 2 +- platform/osx/crash_handler_osx.mm | 2 +- platform/osx/export/export.cpp | 2 +- platform/server/os_server.cpp | 2 +- platform/uwp/context_egl_uwp.h | 2 +- platform/uwp/export/export.cpp | 6 +- platform/uwp/os_uwp.cpp | 2 +- platform/uwp/os_uwp.h | 2 +- platform/windows/context_gl_windows.h | 2 +- platform/windows/crash_handler_windows.cpp | 2 +- platform/windows/display_server_windows.h | 2 +- platform/windows/os_windows.h | 2 +- scene/2d/area_2d.h | 2 +- scene/2d/audio_stream_player_2d.cpp | 2 +- scene/2d/camera_2d.cpp | 2 +- scene/2d/collision_polygon_2d.cpp | 2 +- scene/2d/collision_shape_2d.cpp | 2 +- scene/2d/cpu_particles_2d.h | 2 +- scene/2d/gpu_particles_2d.cpp | 2 +- scene/2d/gpu_particles_2d.h | 2 +- scene/2d/joints_2d.cpp | 2 +- scene/2d/light_2d.cpp | 2 +- scene/2d/light_occluder_2d.cpp | 2 +- scene/2d/line_builder.h | 2 +- scene/2d/navigation_agent_2d.cpp | 2 +- scene/2d/navigation_agent_2d.h | 2 +- scene/2d/navigation_region_2d.cpp | 2 +- scene/2d/node_2d.cpp | 2 +- scene/2d/parallax_layer.cpp | 2 +- scene/2d/path_2d.cpp | 2 +- scene/2d/physics_body_2d.cpp | 8 +- scene/2d/physics_body_2d.h | 2 +- scene/2d/position_2d.cpp | 2 +- scene/2d/ray_cast_2d.cpp | 2 +- scene/2d/tile_map.h | 4 +- scene/2d/visibility_notifier_2d.cpp | 2 +- scene/3d/area_3d.h | 2 +- scene/3d/audio_stream_player_3d.cpp | 2 +- scene/3d/baked_lightmap.cpp | 2 +- scene/3d/baked_lightmap.h | 2 +- scene/3d/camera_3d.cpp | 2 +- scene/3d/cpu_particles_3d.h | 2 +- scene/3d/gpu_particles_3d.h | 2 +- scene/3d/gpu_particles_collision_3d.cpp | 2 +- scene/3d/gpu_particles_collision_3d.h | 4 +- scene/3d/light_3d.cpp | 4 +- scene/3d/navigation_agent_3d.cpp | 2 +- scene/3d/navigation_agent_3d.h | 2 +- scene/3d/node_3d.cpp | 4 +- scene/3d/path_3d.cpp | 2 +- scene/3d/physics_body_3d.cpp | 8 +- scene/3d/physics_body_3d.h | 2 +- scene/3d/ray_cast_3d.cpp | 2 +- scene/3d/skeleton_3d.cpp | 8 +- scene/3d/skeleton_3d.h | 2 +- scene/3d/soft_body_3d.cpp | 6 +- scene/3d/spring_arm_3d.cpp | 2 +- scene/3d/velocity_tracker_3d.cpp | 2 +- scene/3d/visibility_notifier_3d.cpp | 2 +- scene/3d/visual_instance_3d.h | 2 +- scene/animation/animation_player.cpp | 4 +- scene/animation/animation_tree.cpp | 2 +- scene/audio/audio_stream_player.cpp | 2 +- scene/debugger/scene_debugger.cpp | 2 +- scene/debugger/scene_debugger.h | 8 +- scene/gui/button.cpp | 2 +- scene/gui/check_button.cpp | 2 +- scene/gui/container.cpp | 2 +- scene/gui/control.cpp | 6 +- scene/gui/control.h | 2 +- scene/gui/dialogs.cpp | 4 +- scene/gui/file_dialog.cpp | 2 +- scene/gui/item_list.cpp | 2 +- scene/gui/label.cpp | 6 +- scene/gui/line_edit.cpp | 6 +- scene/gui/option_button.cpp | 2 +- scene/gui/panel.cpp | 2 +- scene/gui/popup.cpp | 2 +- scene/gui/popup.h | 2 +- scene/gui/popup_menu.cpp | 4 +- scene/gui/reference_rect.cpp | 2 +- scene/gui/rich_text_effect.cpp | 2 +- scene/gui/rich_text_effect.h | 2 +- scene/gui/scroll_bar.cpp | 2 +- scene/gui/shortcut.h | 2 +- scene/gui/subviewport_container.cpp | 2 +- scene/gui/tab_container.cpp | 2 +- scene/gui/tabs.cpp | 2 +- scene/gui/text_edit.cpp | 6 +- scene/gui/texture_progress.cpp | 2 +- scene/gui/tree.cpp | 4 +- scene/main/canvas_item.cpp | 2 +- scene/main/http_request.cpp | 2 +- scene/main/node.cpp | 4 +- scene/main/node.h | 12 +- scene/main/scene_tree.cpp | 6 +- scene/main/scene_tree.h | 2 +- scene/main/timer.cpp | 2 +- scene/main/viewport.cpp | 2 +- scene/register_scene_types.cpp | 4 +- scene/resources/animation.h | 2 +- scene/resources/bit_map.h | 4 +- scene/resources/camera_effects.h | 4 +- scene/resources/curve.h | 2 +- scene/resources/dynamic_font.h | 2 +- scene/resources/environment.cpp | 2 +- scene/resources/environment.h | 2 +- scene/resources/font.h | 4 +- scene/resources/gradient.h | 2 +- scene/resources/material.cpp | 2 +- scene/resources/material.h | 4 +- scene/resources/mesh.cpp | 2 +- scene/resources/mesh.h | 2 +- scene/resources/mesh_library.h | 4 +- scene/resources/packed_scene.cpp | 4 +- scene/resources/packed_scene.h | 2 +- scene/resources/particles_material.h | 2 +- scene/resources/physics_material.h | 2 +- scene/resources/polygon_path_finder.h | 2 +- scene/resources/resource_format_text.cpp | 2 +- scene/resources/resource_format_text.h | 2 +- scene/resources/shader.h | 2 +- scene/resources/shape_2d.h | 2 +- scene/resources/shape_3d.h | 2 +- scene/resources/skin.h | 2 +- scene/resources/sky_material.h | 2 +- scene/resources/style_box.h | 2 +- scene/resources/syntax_highlighter.cpp | 2 +- scene/resources/syntax_highlighter.h | 2 +- scene/resources/texture.h | 2 +- scene/resources/theme.cpp | 2 +- scene/resources/theme.h | 2 +- scene/resources/tile_set.cpp | 4 +- scene/resources/tile_set.h | 4 +- scene/resources/visual_shader.cpp | 2 +- scene/resources/visual_shader.h | 2 +- scene/resources/world_2d.cpp | 2 +- scene/resources/world_2d.h | 4 +- scene/resources/world_3d.h | 2 +- scene/scene_string_names.h | 4 +- servers/audio/audio_driver_dummy.cpp | 2 +- servers/audio/audio_effect.h | 2 +- servers/audio/audio_stream.cpp | 2 +- servers/audio/audio_stream.h | 4 +- servers/audio/effects/audio_stream_generator.h | 2 +- servers/audio/effects/eq.cpp | 2 +- servers/audio/effects/eq.h | 2 +- servers/audio_server.cpp | 2 +- servers/audio_server.h | 4 +- servers/camera/camera_feed.h | 2 +- servers/camera_server.h | 8 +- servers/display_server.h | 4 +- servers/navigation_server_2d.h | 4 +- servers/navigation_server_3d.h | 4 +- servers/physics_2d/area_2d_sw.h | 2 +- servers/physics_2d/body_2d_sw.h | 2 +- servers/physics_2d/broad_phase_2d_basic.h | 2 +- servers/physics_2d/broad_phase_2d_hash_grid.cpp | 2 +- servers/physics_2d/broad_phase_2d_hash_grid.h | 2 +- servers/physics_2d/collision_object_2d_sw.h | 2 +- servers/physics_2d/physics_server_2d_sw.cpp | 2 +- servers/physics_2d/physics_server_2d_sw.h | 2 +- servers/physics_2d/physics_server_2d_wrap_mt.h | 4 +- servers/physics_2d/shape_2d_sw.cpp | 2 +- servers/physics_2d/space_2d_sw.cpp | 2 +- servers/physics_2d/space_2d_sw.h | 4 +- servers/physics_3d/area_3d_sw.h | 2 +- servers/physics_3d/body_3d_sw.h | 2 +- servers/physics_3d/broad_phase_3d_basic.cpp | 4 +- servers/physics_3d/broad_phase_3d_basic.h | 2 +- servers/physics_3d/collision_object_3d_sw.h | 2 +- servers/physics_3d/physics_server_3d_sw.h | 2 +- servers/physics_3d/shape_3d_sw.cpp | 2 +- servers/physics_3d/space_3d_sw.cpp | 2 +- servers/physics_3d/space_3d_sw.h | 4 +- servers/physics_server_2d.cpp | 4 +- servers/physics_server_2d.h | 6 +- servers/physics_server_3d.cpp | 4 +- servers/physics_server_3d.h | 4 +- servers/register_server_types.cpp | 4 +- servers/rendering/rasterizer.cpp | 2 +- servers/rendering/rasterizer.h | 4 +- .../rasterizer_rd/rasterizer_canvas_rd.cpp | 2 +- .../rasterizer_rd/rasterizer_effects_rd.cpp | 2 +- servers/rendering/rasterizer_rd/rasterizer_rd.cpp | 2 +- servers/rendering/rasterizer_rd/rasterizer_rd.h | 2 +- .../rasterizer_rd/rasterizer_scene_high_end_rd.cpp | 2 +- .../rasterizer_rd/rasterizer_scene_rd.cpp | 2 +- .../rendering/rasterizer_rd/rasterizer_scene_rd.h | 4 +- .../rasterizer_rd/rasterizer_storage_rd.cpp | 4 +- .../rasterizer_rd/rasterizer_storage_rd.h | 2 +- .../render_pipeline_vertex_format_cache_rd.h | 2 +- .../rendering/rasterizer_rd/shader_compiler_rd.cpp | 2 +- .../rendering/rasterizer_rd/shader_compiler_rd.h | 2 +- servers/rendering/rasterizer_rd/shader_rd.cpp | 2 +- servers/rendering/rasterizer_rd/shader_rd.h | 8 +- servers/rendering/rendering_device.h | 4 +- servers/rendering/rendering_server_raster.cpp | 4 +- servers/rendering/rendering_server_scene.h | 6 +- servers/rendering/rendering_server_viewport.cpp | 2 +- servers/rendering/rendering_server_viewport.h | 4 +- servers/rendering/rendering_server_wrap_mt.cpp | 2 +- servers/rendering/rendering_server_wrap_mt.h | 2 +- servers/rendering/shader_language.cpp | 2 +- servers/rendering/shader_language.h | 12 +- servers/rendering/shader_types.h | 2 +- servers/rendering_server.cpp | 2 +- servers/rendering_server.h | 10 +- servers/xr_server.cpp | 2 +- servers/xr_server.h | 6 +- tests/test_basis.h | 2 +- tests/test_class_db.h | 18 +- tests/test_color.h | 2 +- tests/test_command_queue.h | 4 +- tests/test_gradient.h | 4 +- tests/test_gui.cpp | 2 +- tests/test_list.h | 2 +- tests/test_macros.h | 4 +- tests/test_main.cpp | 2 +- tests/test_math.cpp | 10 +- tests/test_method_bind.h | 2 +- tests/test_oa_hash_map.cpp | 2 +- tests/test_ordered_hash_map.h | 6 +- tests/test_physics_2d.cpp | 4 +- tests/test_physics_3d.cpp | 4 +- tests/test_render.cpp | 2 +- tests/test_shader_lang.cpp | 2 +- tests/test_string.h | 2 +- tests/test_variant.h | 4 +- thirdparty/libogg/ogg/config_types.h | 2 +- thirdparty/misc/triangulator.h | 4 +- 914 files changed, 58389 insertions(+), 58645 deletions(-) delete mode 100644 core/array.cpp delete mode 100644 core/array.h delete mode 100644 core/bind/SCsub delete mode 100644 core/bind/core_bind.cpp delete mode 100644 core/bind/core_bind.h delete mode 100644 core/binder_common.h delete mode 100644 core/callable.cpp delete mode 100644 core/callable.h delete mode 100644 core/callable_bind.cpp delete mode 100644 core/callable_bind.h delete mode 100644 core/callable_method_pointer.cpp delete mode 100644 core/callable_method_pointer.h delete mode 100644 core/class_db.cpp delete mode 100644 core/class_db.h delete mode 100644 core/color.cpp delete mode 100644 core/color.h delete mode 100644 core/color_names.inc delete mode 100644 core/command_queue_mt.cpp delete mode 100644 core/command_queue_mt.h delete mode 100644 core/compressed_translation.cpp delete mode 100644 core/compressed_translation.h create mode 100644 core/config/SCsub create mode 100644 core/config/engine.cpp create mode 100644 core/config/engine.h create mode 100644 core/config/project_settings.cpp create mode 100644 core/config/project_settings.h delete mode 100644 core/container_type_validate.h create mode 100644 core/core_bind.cpp create mode 100644 core/core_bind.h create mode 100644 core/core_constants.cpp create mode 100644 core/core_constants.h delete mode 100644 core/cowdata.h delete mode 100644 core/dictionary.cpp delete mode 100644 core/dictionary.h delete mode 100644 core/engine.cpp delete mode 100644 core/engine.h create mode 100644 core/error/SCsub create mode 100644 core/error/error_list.h create mode 100644 core/error/error_macros.cpp create mode 100644 core/error/error_macros.h delete mode 100644 core/error_list.h delete mode 100644 core/error_macros.cpp delete mode 100644 core/error_macros.h delete mode 100644 core/func_ref.cpp delete mode 100644 core/func_ref.h delete mode 100644 core/global_constants.cpp delete mode 100644 core/global_constants.h delete mode 100644 core/hash_map.h delete mode 100644 core/hashfuncs.h delete mode 100644 core/image.cpp delete mode 100644 core/image.h delete mode 100644 core/int_types.h create mode 100644 core/io/image.cpp create mode 100644 core/io/image.h create mode 100644 core/io/packed_data_container.cpp create mode 100644 core/io/packed_data_container.h create mode 100644 core/io/resource.cpp create mode 100644 core/io/resource.h delete mode 100644 core/list.h delete mode 100644 core/local_vector.h delete mode 100644 core/map.h create mode 100644 core/math/color.cpp create mode 100644 core/math/color.h create mode 100644 core/math/color_names.inc delete mode 100644 core/message_queue.cpp delete mode 100644 core/message_queue.h delete mode 100644 core/method_bind.cpp delete mode 100644 core/method_bind.h delete mode 100644 core/method_ptrcall.h delete mode 100644 core/node_path.cpp delete mode 100644 core/node_path.h delete mode 100644 core/oa_hash_map.h delete mode 100644 core/object.cpp delete mode 100644 core/object.h create mode 100644 core/object/SCsub create mode 100644 core/object/callable_method_pointer.cpp create mode 100644 core/object/callable_method_pointer.h create mode 100644 core/object/class_db.cpp create mode 100644 core/object/class_db.h create mode 100644 core/object/message_queue.cpp create mode 100644 core/object/message_queue.h create mode 100644 core/object/method_bind.cpp create mode 100644 core/object/method_bind.h create mode 100644 core/object/object.cpp create mode 100644 core/object/object.h create mode 100644 core/object/object_id.h create mode 100644 core/object/reference.cpp create mode 100644 core/object/reference.h create mode 100644 core/object/script_language.cpp create mode 100644 core/object/script_language.h create mode 100644 core/object/undo_redo.cpp create mode 100644 core/object/undo_redo.h delete mode 100644 core/object_id.h delete mode 100644 core/ordered_hash_map.h create mode 100644 core/os/pool_allocator.cpp create mode 100644 core/os/pool_allocator.h create mode 100644 core/os/spin_lock.h delete mode 100644 core/packed_data_container.cpp delete mode 100644 core/packed_data_container.h delete mode 100644 core/pair.h delete mode 100644 core/pool_allocator.cpp delete mode 100644 core/pool_allocator.h delete mode 100644 core/print_string.cpp delete mode 100644 core/print_string.h delete mode 100644 core/project_settings.cpp delete mode 100644 core/project_settings.h delete mode 100644 core/reference.cpp delete mode 100644 core/reference.h delete mode 100644 core/resource.cpp delete mode 100644 core/resource.h delete mode 100644 core/rid.h delete mode 100644 core/rid_owner.cpp delete mode 100644 core/rid_owner.h delete mode 100644 core/ring_buffer.h delete mode 100644 core/safe_refcount.cpp delete mode 100644 core/safe_refcount.h delete mode 100644 core/script_language.cpp delete mode 100644 core/script_language.h delete mode 100644 core/self_list.h delete mode 100644 core/set.h delete mode 100644 core/simple_type.h delete mode 100644 core/sort_array.h delete mode 100644 core/spin_lock.h create mode 100644 core/string/SCsub create mode 100644 core/string/compressed_translation.cpp create mode 100644 core/string/compressed_translation.h create mode 100644 core/string/node_path.cpp create mode 100644 core/string/node_path.h create mode 100644 core/string/print_string.cpp create mode 100644 core/string/print_string.h create mode 100644 core/string/string_buffer.h create mode 100644 core/string/string_builder.cpp create mode 100644 core/string/string_builder.h create mode 100644 core/string/string_name.cpp create mode 100644 core/string/string_name.h create mode 100644 core/string/translation.cpp create mode 100644 core/string/translation.h create mode 100644 core/string/translation_po.cpp create mode 100644 core/string/translation_po.h create mode 100644 core/string/ucaps.h create mode 100644 core/string/ustring.cpp create mode 100644 core/string/ustring.h delete mode 100644 core/string_buffer.h delete mode 100644 core/string_builder.cpp delete mode 100644 core/string_builder.h delete mode 100644 core/string_name.cpp delete mode 100644 core/string_name.h create mode 100644 core/templates/SCsub create mode 100644 core/templates/command_queue_mt.cpp create mode 100644 core/templates/command_queue_mt.h create mode 100644 core/templates/cowdata.h create mode 100644 core/templates/hash_map.h create mode 100644 core/templates/hashfuncs.h create mode 100644 core/templates/list.h create mode 100644 core/templates/local_vector.h create mode 100644 core/templates/map.h create mode 100644 core/templates/oa_hash_map.h create mode 100644 core/templates/ordered_hash_map.h create mode 100644 core/templates/pair.h create mode 100644 core/templates/rid.h create mode 100644 core/templates/rid_owner.cpp create mode 100644 core/templates/rid_owner.h create mode 100644 core/templates/ring_buffer.h create mode 100644 core/templates/safe_refcount.cpp create mode 100644 core/templates/safe_refcount.h create mode 100644 core/templates/self_list.h create mode 100644 core/templates/set.h create mode 100644 core/templates/simple_type.h create mode 100644 core/templates/sort_array.h create mode 100644 core/templates/thread_work_pool.cpp create mode 100644 core/templates/thread_work_pool.h create mode 100644 core/templates/vector.h create mode 100644 core/templates/vmap.h create mode 100644 core/templates/vset.h delete mode 100644 core/thread_work_pool.cpp delete mode 100644 core/thread_work_pool.h delete mode 100644 core/translation.cpp delete mode 100644 core/translation.h delete mode 100644 core/translation_po.cpp delete mode 100644 core/translation_po.h delete mode 100644 core/type_info.h delete mode 100644 core/typed_array.h delete mode 100644 core/ucaps.h delete mode 100644 core/undo_redo.cpp delete mode 100644 core/undo_redo.h delete mode 100644 core/ustring.cpp delete mode 100644 core/ustring.h delete mode 100644 core/variant.cpp delete mode 100644 core/variant.h create mode 100644 core/variant/SCsub create mode 100644 core/variant/array.cpp create mode 100644 core/variant/array.h create mode 100644 core/variant/binder_common.h create mode 100644 core/variant/callable.cpp create mode 100644 core/variant/callable.h create mode 100644 core/variant/callable_bind.cpp create mode 100644 core/variant/callable_bind.h create mode 100644 core/variant/container_type_validate.h create mode 100644 core/variant/dictionary.cpp create mode 100644 core/variant/dictionary.h create mode 100644 core/variant/method_ptrcall.h create mode 100644 core/variant/type_info.h create mode 100644 core/variant/typed_array.h create mode 100644 core/variant/variant.cpp create mode 100644 core/variant/variant.h create mode 100644 core/variant/variant_call.cpp create mode 100644 core/variant/variant_internal.h create mode 100644 core/variant/variant_op.cpp create mode 100644 core/variant/variant_parser.cpp create mode 100644 core/variant/variant_parser.h create mode 100644 core/variant/variant_setget.cpp delete mode 100644 core/variant_call.cpp delete mode 100644 core/variant_internal.h delete mode 100644 core/variant_op.cpp delete mode 100644 core/variant_parser.cpp delete mode 100644 core/variant_parser.h delete mode 100644 core/variant_setget.cpp delete mode 100644 core/vector.h delete mode 100644 core/vmap.h delete mode 100644 core/vset.h diff --git a/core/SCsub b/core/SCsub index b9f06d12ae..78a4395619 100644 --- a/core/SCsub +++ b/core/SCsub @@ -34,7 +34,7 @@ if "SCRIPT_AES256_ENCRYPTION_KEY" in os.environ: # NOTE: It is safe to generate this file here, since this is still executed serially with open("script_encryption_key.gen.cpp", "w") as f: - f.write('#include "core/project_settings.h"\nuint8_t script_encryption_key[32]={' + txt + "};\n") + f.write('#include "core/config/project_settings.h"\nuint8_t script_encryption_key[32]={' + txt + "};\n") # Add required thirdparty code. @@ -174,7 +174,12 @@ SConscript("crypto/SCsub") SConscript("io/SCsub") SConscript("debugger/SCsub") SConscript("input/SCsub") -SConscript("bind/SCsub") +SConscript("variant/SCsub") +SConscript("object/SCsub") +SConscript("templates/SCsub") +SConscript("string/SCsub") +SConscript("config/SCsub") +SConscript("error/SCsub") # Build it all as a library diff --git a/core/array.cpp b/core/array.cpp deleted file mode 100644 index 514f5a5dad..0000000000 --- a/core/array.cpp +++ /dev/null @@ -1,556 +0,0 @@ -/*************************************************************************/ -/* array.cpp */ -/*************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/*************************************************************************/ -/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ -/* */ -/* Permission is hereby granted, free of charge, to any person obtaining */ -/* a copy of this software and associated documentation files (the */ -/* "Software"), to deal in the Software without restriction, including */ -/* without limitation the rights to use, copy, modify, merge, publish, */ -/* distribute, sublicense, and/or sell copies of the Software, and to */ -/* permit persons to whom the Software is furnished to do so, subject to */ -/* the following conditions: */ -/* */ -/* The above copyright notice and this permission notice shall be */ -/* included in all copies or substantial portions of the Software. */ -/* */ -/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ -/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ -/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/ -/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ -/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ -/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ -/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/*************************************************************************/ - -#include "array.h" - -#include "container_type_validate.h" -#include "core/class_db.h" -#include "core/hashfuncs.h" -#include "core/script_language.h" -#include "core/variant.h" -#include "core/vector.h" - -class ArrayPrivate { -public: - SafeRefCount refcount; - Vector array; - - ContainerTypeValidate typed; -}; - -void Array::_ref(const Array &p_from) const { - ArrayPrivate *_fp = p_from._p; - - ERR_FAIL_COND(!_fp); // should NOT happen. - - if (_fp == _p) { - return; // whatever it is, nothing to do here move along - } - - bool success = _fp->refcount.ref(); - - ERR_FAIL_COND(!success); // should really not happen either - - _unref(); - - _p = p_from._p; -} - -void Array::_unref() const { - if (!_p) { - return; - } - - if (_p->refcount.unref()) { - memdelete(_p); - } - _p = nullptr; -} - -Variant &Array::operator[](int p_idx) { - return _p->array.write[p_idx]; -} - -const Variant &Array::operator[](int p_idx) const { - return _p->array[p_idx]; -} - -int Array::size() const { - return _p->array.size(); -} - -bool Array::empty() const { - return _p->array.empty(); -} - -void Array::clear() { - _p->array.clear(); -} - -bool Array::operator==(const Array &p_array) const { - return _p == p_array._p; -} - -bool Array::operator!=(const Array &p_array) const { - return !operator==(p_array); -} - -bool Array::operator<(const Array &p_array) const { - int a_len = size(); - int b_len = p_array.size(); - - int min_cmp = MIN(a_len, b_len); - - for (int i = 0; i < min_cmp; i++) { - if (operator[](i) < p_array[i]) { - return true; - } else if (p_array[i] < operator[](i)) { - return false; - } - } - - return a_len < b_len; -} - -bool Array::operator<=(const Array &p_array) const { - return !operator>(p_array); -} -bool Array::operator>(const Array &p_array) const { - return p_array < *this; -} -bool Array::operator>=(const Array &p_array) const { - return !operator<(p_array); -} - -uint32_t Array::hash() const { - uint32_t h = hash_djb2_one_32(0); - - for (int i = 0; i < _p->array.size(); i++) { - h = hash_djb2_one_32(_p->array[i].hash(), h); - } - return h; -} - -void Array::_assign(const Array &p_array) { - if (_p->typed.type != Variant::OBJECT && _p->typed.type == p_array._p->typed.type) { - //same type or untyped, just reference, shuold be fine - _ref(p_array); - } else if (_p->typed.type == Variant::NIL) { //from typed to untyped, must copy, but this is cheap anyway - _p->array = p_array._p->array; - } else if (p_array._p->typed.type == Variant::NIL) { //from untyped to typed, must try to check if they are all valid - if (_p->typed.type == Variant::OBJECT) { - //for objects, it needs full validation, either can be converted or fail - for (int i = 0; i < p_array._p->array.size(); i++) { - if (!_p->typed.validate(p_array._p->array[i], "assign")) { - return; - } - } - _p->array = p_array._p->array; //then just copy, which is cheap anyway - - } else { - //for non objects, we need to check if there is a valid conversion, which needs to happen one by one, so this is the worst case. - Vector new_array; - new_array.resize(p_array._p->array.size()); - for (int i = 0; i < p_array._p->array.size(); i++) { - Variant src_val = p_array._p->array[i]; - if (src_val.get_type() == _p->typed.type) { - new_array.write[i] = src_val; - } else if (Variant::can_convert_strict(src_val.get_type(), _p->typed.type)) { - Variant *ptr = &src_val; - Callable::CallError ce; - new_array.write[i] = Variant::construct(_p->typed.type, (const Variant **)&ptr, 1, ce, true); - if (ce.error != Callable::CallError::CALL_OK) { - ERR_FAIL_MSG("Unable to convert array index " + itos(i) + " from '" + Variant::get_type_name(src_val.get_type()) + "' to '" + Variant::get_type_name(_p->typed.type) + "'."); - } - } else { - ERR_FAIL_MSG("Unable to convert array index " + itos(i) + " from '" + Variant::get_type_name(src_val.get_type()) + "' to '" + Variant::get_type_name(_p->typed.type) + "'."); - } - } - - _p->array = new_array; - } - } else if (_p->typed.can_reference(p_array._p->typed)) { //same type or compatible - _ref(p_array); - } else { - ERR_FAIL_MSG("Assignment of arrays of incompatible types."); - } -} - -void Array::operator=(const Array &p_array) { - _assign(p_array); -} - -void Array::push_back(const Variant &p_value) { - ERR_FAIL_COND(!_p->typed.validate(p_value, "push_back")); - _p->array.push_back(p_value); -} - -Error Array::resize(int p_new_size) { - return _p->array.resize(p_new_size); -} - -void Array::insert(int p_pos, const Variant &p_value) { - ERR_FAIL_COND(!_p->typed.validate(p_value, "insert")); - _p->array.insert(p_pos, p_value); -} - -void Array::erase(const Variant &p_value) { - ERR_FAIL_COND(!_p->typed.validate(p_value, "erase")); - _p->array.erase(p_value); -} - -Variant Array::front() const { - ERR_FAIL_COND_V_MSG(_p->array.size() == 0, Variant(), "Can't take value from empty array."); - return operator[](0); -} - -Variant Array::back() const { - ERR_FAIL_COND_V_MSG(_p->array.size() == 0, Variant(), "Can't take value from empty array."); - return operator[](_p->array.size() - 1); -} - -int Array::find(const Variant &p_value, int p_from) const { - ERR_FAIL_COND_V(!_p->typed.validate(p_value, "find"), -1); - return _p->array.find(p_value, p_from); -} - -int Array::rfind(const Variant &p_value, int p_from) const { - if (_p->array.size() == 0) { - return -1; - } - ERR_FAIL_COND_V(!_p->typed.validate(p_value, "rfind"), -1); - - if (p_from < 0) { - // Relative offset from the end - p_from = _p->array.size() + p_from; - } - if (p_from < 0 || p_from >= _p->array.size()) { - // Limit to array boundaries - p_from = _p->array.size() - 1; - } - - for (int i = p_from; i >= 0; i--) { - if (_p->array[i] == p_value) { - return i; - } - } - - return -1; -} - -int Array::find_last(const Variant &p_value) const { - ERR_FAIL_COND_V(!_p->typed.validate(p_value, "find_last"), -1); - return rfind(p_value); -} - -int Array::count(const Variant &p_value) const { - ERR_FAIL_COND_V(!_p->typed.validate(p_value, "count"), 0); - if (_p->array.size() == 0) { - return 0; - } - - int amount = 0; - for (int i = 0; i < _p->array.size(); i++) { - if (_p->array[i] == p_value) { - amount++; - } - } - - return amount; -} - -bool Array::has(const Variant &p_value) const { - ERR_FAIL_COND_V(!_p->typed.validate(p_value, "use 'has'"), false); - - return _p->array.find(p_value, 0) != -1; -} - -void Array::remove(int p_pos) { - _p->array.remove(p_pos); -} - -void Array::set(int p_idx, const Variant &p_value) { - ERR_FAIL_COND(!_p->typed.validate(p_value, "set")); - - operator[](p_idx) = p_value; -} - -const Variant &Array::get(int p_idx) const { - return operator[](p_idx); -} - -Array Array::duplicate(bool p_deep) const { - Array new_arr; - int element_count = size(); - new_arr.resize(element_count); - new_arr._p->typed = _p->typed; - for (int i = 0; i < element_count; i++) { - new_arr[i] = p_deep ? get(i).duplicate(p_deep) : get(i); - } - - return new_arr; -} - -int Array::_clamp_slice_index(int p_index) const { - int arr_size = size(); - int fixed_index = CLAMP(p_index, -arr_size, arr_size - 1); - if (fixed_index < 0) { - fixed_index = arr_size + fixed_index; - } - return fixed_index; -} - -Array Array::slice(int p_begin, int p_end, int p_step, bool p_deep) const { // like python, but inclusive on upper bound - - Array new_arr; - - ERR_FAIL_COND_V_MSG(p_step == 0, new_arr, "Array slice step size cannot be zero."); - - if (empty()) { // Don't try to slice empty arrays. - return new_arr; - } - if (p_step > 0) { - if (p_begin >= size() || p_end < -size()) { - return new_arr; - } - } else { // p_step < 0 - if (p_begin < -size() || p_end >= size()) { - return new_arr; - } - } - - int begin = _clamp_slice_index(p_begin); - int end = _clamp_slice_index(p_end); - - int new_arr_size = MAX(((end - begin + p_step) / p_step), 0); - new_arr.resize(new_arr_size); - - if (p_step > 0) { - int dest_idx = 0; - for (int idx = begin; idx <= end; idx += p_step) { - ERR_FAIL_COND_V_MSG(dest_idx < 0 || dest_idx >= new_arr_size, Array(), "Bug in Array slice()"); - new_arr[dest_idx++] = p_deep ? get(idx).duplicate(p_deep) : get(idx); - } - } else { // p_step < 0 - int dest_idx = 0; - for (int idx = begin; idx >= end; idx += p_step) { - ERR_FAIL_COND_V_MSG(dest_idx < 0 || dest_idx >= new_arr_size, Array(), "Bug in Array slice()"); - new_arr[dest_idx++] = p_deep ? get(idx).duplicate(p_deep) : get(idx); - } - } - - return new_arr; -} - -struct _ArrayVariantSort { - _FORCE_INLINE_ bool operator()(const Variant &p_l, const Variant &p_r) const { - bool valid = false; - Variant res; - Variant::evaluate(Variant::OP_LESS, p_l, p_r, res, valid); - if (!valid) { - res = false; - } - return res; - } -}; - -void Array::sort() { - _p->array.sort_custom<_ArrayVariantSort>(); -} - -struct _ArrayVariantSortCustom { - Object *obj; - StringName func; - - _FORCE_INLINE_ bool operator()(const Variant &p_l, const Variant &p_r) const { - const Variant *args[2] = { &p_l, &p_r }; - Callable::CallError err; - bool res = obj->call(func, args, 2, err); - if (err.error != Callable::CallError::CALL_OK) { - res = false; - } - return res; - } -}; -void Array::sort_custom(Object *p_obj, const StringName &p_function) { - ERR_FAIL_NULL(p_obj); - - SortArray avs; - avs.compare.obj = p_obj; - avs.compare.func = p_function; - avs.sort(_p->array.ptrw(), _p->array.size()); -} - -void Array::shuffle() { - const int n = _p->array.size(); - if (n < 2) { - return; - } - Variant *data = _p->array.ptrw(); - for (int i = n - 1; i >= 1; i--) { - const int j = Math::rand() % (i + 1); - const Variant tmp = data[j]; - data[j] = data[i]; - data[i] = tmp; - } -} - -template -_FORCE_INLINE_ int bisect(const Vector &p_array, const Variant &p_value, bool p_before, const Less &p_less) { - int lo = 0; - int hi = p_array.size(); - if (p_before) { - while (lo < hi) { - const int mid = (lo + hi) / 2; - if (p_less(p_array.get(mid), p_value)) { - lo = mid + 1; - } else { - hi = mid; - } - } - } else { - while (lo < hi) { - const int mid = (lo + hi) / 2; - if (p_less(p_value, p_array.get(mid))) { - hi = mid; - } else { - lo = mid + 1; - } - } - } - return lo; -} - -int Array::bsearch(const Variant &p_value, bool p_before) { - ERR_FAIL_COND_V(!_p->typed.validate(p_value, "binary search"), -1); - return bisect(_p->array, p_value, p_before, _ArrayVariantSort()); -} - -int Array::bsearch_custom(const Variant &p_value, Object *p_obj, const StringName &p_function, bool p_before) { - ERR_FAIL_COND_V(!_p->typed.validate(p_value, "custom binary search"), -1); - ERR_FAIL_NULL_V(p_obj, 0); - - _ArrayVariantSortCustom less; - less.obj = p_obj; - less.func = p_function; - - return bisect(_p->array, p_value, p_before, less); -} - -void Array::invert() { - _p->array.invert(); -} - -void Array::push_front(const Variant &p_value) { - ERR_FAIL_COND(!_p->typed.validate(p_value, "push_front")); - _p->array.insert(0, p_value); -} - -Variant Array::pop_back() { - if (!_p->array.empty()) { - int n = _p->array.size() - 1; - Variant ret = _p->array.get(n); - _p->array.resize(n); - return ret; - } - return Variant(); -} - -Variant Array::pop_front() { - if (!_p->array.empty()) { - Variant ret = _p->array.get(0); - _p->array.remove(0); - return ret; - } - return Variant(); -} - -Variant Array::min() const { - Variant minval; - for (int i = 0; i < size(); i++) { - if (i == 0) { - minval = get(i); - } else { - bool valid; - Variant ret; - Variant test = get(i); - Variant::evaluate(Variant::OP_LESS, test, minval, ret, valid); - if (!valid) { - return Variant(); //not a valid comparison - } - if (bool(ret)) { - //is less - minval = test; - } - } - } - return minval; -} - -Variant Array::max() const { - Variant maxval; - for (int i = 0; i < size(); i++) { - if (i == 0) { - maxval = get(i); - } else { - bool valid; - Variant ret; - Variant test = get(i); - Variant::evaluate(Variant::OP_GREATER, test, maxval, ret, valid); - if (!valid) { - return Variant(); //not a valid comparison - } - if (bool(ret)) { - //is less - maxval = test; - } - } - } - return maxval; -} - -const void *Array::id() const { - return _p->array.ptr(); -} - -Array::Array(const Array &p_from, uint32_t p_type, const StringName &p_class_name, const Variant &p_script) { - _p = memnew(ArrayPrivate); - _p->refcount.init(); - set_typed(p_type, p_class_name, p_script); - _assign(p_from); -} - -void Array::set_typed(uint32_t p_type, const StringName &p_class_name, const Variant &p_script) { - ERR_FAIL_COND_MSG(_p->array.size() > 0, "Type can only be set when array is empty."); - ERR_FAIL_COND_MSG(_p->refcount.get() > 1, "Type can only be set when array has no more than one user."); - ERR_FAIL_COND_MSG(_p->typed.type != Variant::NIL, "Type can only be set once."); - ERR_FAIL_COND_MSG(p_class_name != StringName() && p_type != Variant::OBJECT, "Class names can only be set for type OBJECT"); - Ref