diff --git a/core/locales.h b/core/locales.h index 32d6608ec..c6c2a6c54 100644 --- a/core/locales.h +++ b/core/locales.h @@ -1,12 +1,13 @@ /*************************************************************************/ /* locales.h */ /*************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ +/* This file is part of: */ +/* PANDEMONIUM ENGINE */ +/* https://github.com/Relintai/pandemonium_engine */ /*************************************************************************/ -/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2022-present Péter Magyar. */ /* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */ +/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/core/variant/variant_parser.cpp b/core/variant/variant_parser.cpp index 9f5ccb6eb..0237f3578 100644 --- a/core/variant/variant_parser.cpp +++ b/core/variant/variant_parser.cpp @@ -1951,7 +1951,7 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str int len = data.size(); PoolVector::Read r = data.read(); const uint8_t *ptr = r.ptr(); - + if (data.size() > 0) { p_store_string_func(p_store_string_ud, "\""); p_store_string_func(p_store_string_ud, CryptoCore::b64_encode_str(ptr, len)); diff --git a/drivers/gles2/rasterizer_canvas_gles2.h b/drivers/gles2/rasterizer_canvas_gles2.h index 015a6f94c..24e474764 100644 --- a/drivers/gles2/rasterizer_canvas_gles2.h +++ b/drivers/gles2/rasterizer_canvas_gles2.h @@ -69,7 +69,7 @@ private: public: void initialize(); RasterizerCanvasGLES2(); - + protected: virtual void _update_texture_rect_animation(RasterizerCanvas::Item::CommandRectAnimation *p_item); }; diff --git a/drivers/gles_common/rasterizer_canvas_batcher.h b/drivers/gles_common/rasterizer_canvas_batcher.h index 885658aaa..e78157eeb 100644 --- a/drivers/gles_common/rasterizer_canvas_batcher.h +++ b/drivers/gles_common/rasterizer_canvas_batcher.h @@ -699,7 +699,6 @@ public: return bdata.vertices.request(); } - protected: virtual void _update_texture_rect_animation(RasterizerCanvas::Item::CommandRectAnimation *p_item) {} @@ -3247,16 +3246,15 @@ PREAMBLE(bool)::_sort_items_match(const BSortItem &p_a, const BSortItem &p_b) co // if (a->commands.size() != 1) // return false; - // p_a's type is already checked outside to be these //const RasterizerCanvas::Item::Command &cb = *b->commands[0]; //if ((cb.type != RasterizerCanvas::Item::Command::TYPE_RECT) && (cb.type != RasterizerCanvas::Item::Command::TYPE_MULTIRECT) && (cb.type != RasterizerCanvas::Item::Command::TYPE_RECT_ANIMATION)) { // return false; //} - + const RasterizerCanvas::Item::Command &ca = *a->commands[0]; const RasterizerCanvas::Item::Command &cb = *b->commands[0]; - + if ((ca.type != cb.type)) { return false; } @@ -3268,21 +3266,21 @@ PREAMBLE(bool)::_sort_items_match(const BSortItem &p_a, const BSortItem &p_b) co if (ca.type == RasterizerCanvas::Item::Command::TYPE_RECT) { const RasterizerCanvas::Item::CommandRect *rect_a = static_cast(&ca); const RasterizerCanvas::Item::CommandRect *rect_b = static_cast(&cb); - + if (rect_a->texture != rect_b->texture) { return false; } } else if (ca.type == RasterizerCanvas::Item::Command::TYPE_MULTIRECT) { const RasterizerCanvas::Item::CommandMultiRect *rect_a = static_cast(&ca); const RasterizerCanvas::Item::CommandMultiRect *rect_b = static_cast(&cb); - + if (rect_a->texture != rect_b->texture) { return false; } } else if (ca.type == RasterizerCanvas::Item::Command::TYPE_RECT_ANIMATION) { const RasterizerCanvas::Item::CommandRectAnimation *rect_a = static_cast(&ca); const RasterizerCanvas::Item::CommandRectAnimation *rect_b = static_cast(&cb); - + if (rect_a->get_command_rect()->texture != rect_b->get_command_rect()->texture) { return false; } diff --git a/editor/editor_locale_dialog.cpp b/editor/editor_locale_dialog.cpp index 6badde05a..9995d960a 100644 --- a/editor/editor_locale_dialog.cpp +++ b/editor/editor_locale_dialog.cpp @@ -1,12 +1,13 @@ /*************************************************************************/ /* editor_locale_dialog.cpp */ /*************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ +/* This file is part of: */ +/* PANDEMONIUM ENGINE */ +/* https://github.com/Relintai/pandemonium_engine */ /*************************************************************************/ -/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2022-present Péter Magyar. */ /* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */ +/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -34,10 +35,10 @@ #include "editor/editor_node.h" #include "editor/editor_scale.h" #include "scene/gui/check_button.h" +#include "scene/gui/label.h" #include "scene/gui/line_edit.h" #include "scene/gui/option_button.h" #include "scene/gui/tree.h" -#include "scene/gui/label.h" void EditorLocaleDialog::_bind_methods() { ClassDB::bind_method(D_METHOD("_filter_mode_changed"), &EditorLocaleDialog::_filter_mode_changed); diff --git a/editor/editor_locale_dialog.h b/editor/editor_locale_dialog.h index bb99f18e9..ef6292f6e 100644 --- a/editor/editor_locale_dialog.h +++ b/editor/editor_locale_dialog.h @@ -1,12 +1,13 @@ /*************************************************************************/ /* editor_locale_dialog.h */ /*************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ +/* This file is part of: */ +/* PANDEMONIUM ENGINE */ +/* https://github.com/Relintai/pandemonium_engine */ /*************************************************************************/ -/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2022-present Péter Magyar. */ /* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */ +/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index 05c3cfe1b..e27de3130 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -57,13 +57,13 @@ #include "editor/create_dialog.h" #include "editor/editor_data.h" #include "editor/editor_file_dialog.h" +#include "editor/editor_locale_dialog.h" #include "editor/editor_plugin.h" #include "editor/editor_resource_picker.h" #include "editor/editor_settings.h" #include "editor/editor_spin_slider.h" #include "editor/property_selector.h" #include "editor/scene_tree_editor.h" -#include "editor/editor_locale_dialog.h" #include "editor_node.h" #include "editor_properties_array_dict.h" #include "editor_scale.h" diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp index 80f8a5549..ec984a7f4 100644 --- a/editor/project_settings_editor.cpp +++ b/editor/project_settings_editor.cpp @@ -56,8 +56,8 @@ #include "editor/editor_export.h" #include "editor/editor_file_dialog.h" #include "editor/editor_inspector.h" -#include "editor/editor_node.h" #include "editor/editor_locale_dialog.h" +#include "editor/editor_node.h" #include "editor/editor_plugin_settings.h" #include "editor/editor_scale.h" #include "editor/editor_sectioned_inspector.h" diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp index c5e32124c..c910f1317 100644 --- a/editor/property_editor.cpp +++ b/editor/property_editor.cpp @@ -68,9 +68,9 @@ #include "editor/dictionary_property_edit.h" #include "editor/editor_data.h" #include "editor/editor_file_dialog.h" +#include "editor/editor_locale_dialog.h" #include "editor/editor_node.h" #include "editor/editor_scale.h" -#include "editor/editor_locale_dialog.h" #include "editor/editor_settings.h" #include "editor/filesystem_dock.h" #include "editor/property_selector.h" diff --git a/editor/quick_open.cpp b/editor/quick_open.cpp index f9b2daa9b..4bf873350 100644 --- a/editor/quick_open.cpp +++ b/editor/quick_open.cpp @@ -207,7 +207,7 @@ void EditorQuickOpen::_update_search() { search_options->clear(); TreeItem *root = search_options->create_item(); EditorFileSystemDirectory *efsd = EditorFileSystem::get_singleton()->get_filesystem(); - + Vector>> list; _parse_fs(efsd, list); diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp index 841b61070..90ce5293a 100644 --- a/editor/scene_tree_editor.cpp +++ b/editor/scene_tree_editor.cpp @@ -52,9 +52,9 @@ #include "editor/node_dock.h" #include "editor/plugins/animation_player_editor_plugin.h" #include "editor/plugins/canvas_item_editor_plugin.h" +#include "scene/3d/lod_manager.h" #include "scene/animation/animation_player.h" #include "scene/gui/box_container.h" -#include "scene/3d/lod_manager.h" #include "scene/gui/label.h" #include "scene/gui/line_edit.h" #include "scene/gui/texture_rect.h" diff --git a/modules/entity_spell_system/singletons/ess.cpp b/modules/entity_spell_system/singletons/ess.cpp index 4f8006853..a789a2b35 100644 --- a/modules/entity_spell_system/singletons/ess.cpp +++ b/modules/entity_spell_system/singletons/ess.cpp @@ -262,7 +262,7 @@ void ESS::stat_set_main_stat_count(const int index) { } // Entity Resources -real_t ESS::entity_resource_get_base_world_speed() const { +real_t ESS::entity_resource_get_base_world_speed() const { return _entity_resource_base_world_speed; } void ESS::entity_resource_set_base_world_speed(const real_t value) { @@ -763,7 +763,7 @@ void ESS::_bind_methods() { ClassDB::bind_method(D_METHOD("stat_get_main_stat_count"), &ESS::stat_get_main_stat_count); ClassDB::bind_method(D_METHOD("stat_set_main_stat_count", "index"), &ESS::stat_set_main_stat_count); ADD_PROPERTY(PropertyInfo(Variant::INT, "main_stat_count"), "stat_set_main_stat_count", "stat_get_main_stat_count"); - + // Entity Resources ClassDB::bind_method(D_METHOD("entity_resource_get_base_world_speed"), &ESS::entity_resource_get_base_world_speed); ClassDB::bind_method(D_METHOD("entity_resource_set_base_world_speed", "index"), &ESS::entity_resource_set_base_world_speed); @@ -905,7 +905,7 @@ ESS::ESS() { stat_set_string(GLOBAL_DEF("ess/enums/stats", "Agility,Strength,Stamina,Intellect,Spirit,Health,Speed,Global Cooldown,Haste")); _stat_main_stat_count = GLOBAL_DEF("ess/enums/main_stat_count", 5); - + _entity_resource_base_world_speed = GLOBAL_DEF("ess/entity_resources/base_world_speed", 100); equip_slot_set_string(GLOBAL_DEF("ess/enums/equip_slots", "Head,Neck,Shoulder,Chest,Gloves,Belt,Legs,Feet,Ring_1,Ring_2,Trinket_1,Trinket_2,Main_Hand,Off_Hand")); diff --git a/modules/entity_spell_system/singletons/ess.h b/modules/entity_spell_system/singletons/ess.h index aaf70eafa..676f95e40 100644 --- a/modules/entity_spell_system/singletons/ess.h +++ b/modules/entity_spell_system/singletons/ess.h @@ -114,7 +114,7 @@ public: int stat_get_main_stat_count() const; void stat_set_main_stat_count(const int index); - + // Entity Resources real_t entity_resource_get_base_world_speed() const; void entity_resource_set_base_world_speed(const real_t value); @@ -258,7 +258,7 @@ private: String _stat_enum_string; int _stat_main_stat_count; - + // Entity Resources real_t _entity_resource_base_world_speed; diff --git a/modules/entity_spell_system/skeleton/character_skeleton_2d.cpp b/modules/entity_spell_system/skeleton/character_skeleton_2d.cpp index 3fdebbbfc..b1b39cf16 100644 --- a/modules/entity_spell_system/skeleton/character_skeleton_2d.cpp +++ b/modules/entity_spell_system/skeleton/character_skeleton_2d.cpp @@ -455,7 +455,7 @@ Array CharacterSkeleton2D::bake_mesh_array_uv(Array arr, Ref tex, float CharacterSkeleton2D::CharacterSkeleton2D() { set_sort_enabled(false); - + _model_dirty = false; _model_index = 0; _entity_type = 0; diff --git a/modules/http_server_simple/http_server_simple.h b/modules/http_server_simple/http_server_simple.h index dc6cbcba1..e3d1311e6 100644 --- a/modules/http_server_simple/http_server_simple.h +++ b/modules/http_server_simple/http_server_simple.h @@ -127,7 +127,7 @@ public: uint64_t max_request_size; uint64_t request_max_file_upload_size; - + WebServerSimple::FileUploadStoreType upload_file_store_type; String upload_temp_file_store_path; diff --git a/modules/layered_tile_map/editor/layered_tile_map_layer_editor.cpp b/modules/layered_tile_map/editor/layered_tile_map_layer_editor.cpp index 75fdc347a..1f1b514aa 100644 --- a/modules/layered_tile_map/editor/layered_tile_map_layer_editor.cpp +++ b/modules/layered_tile_map/editor/layered_tile_map_layer_editor.cpp @@ -37,8 +37,8 @@ #include "editor/editor_resource_preview.h" #include "editor/editor_scale.h" #include "editor/editor_settings.h" -#include "editor/plugins/canvas_item_editor_plugin.h" #include "editor/multi_node_edit.h" +#include "editor/plugins/canvas_item_editor_plugin.h" #include "core/object/undo_redo.h" @@ -2272,7 +2272,7 @@ void LayeredTileMapLayerEditorTilesPlugin::edit(ObjectID p_tile_map_layer_id) { Ref tile_set; if (edited_layer) { tile_set = edited_layer->get_tile_set(); - + if (tile_set.is_valid()) { //source_sort_button->set_disabled(EditorNode::get_singleton()->is_resource_read_only(tile_set)); source_sort_button->set_disabled(false); @@ -2292,7 +2292,7 @@ void LayeredTileMapLayerEditorTilesPlugin::edit(ObjectID p_tile_map_layer_id) { tile_map_selection.clear(); selection_pattern.instance(); } - + edited_tile_map_layer_id = p_tile_map_layer_id; } @@ -3793,11 +3793,10 @@ void LayeredTileMapLayerEditor::_update_tile_map_layers_in_scene_list_cache() { } void LayeredTileMapLayerEditor::_node_change(Node *p_node) { - if (!layers_in_scene_list_cache_needs_update && Engine::get_singleton()->is_editor_hint() && + if (!layers_in_scene_list_cache_needs_update && Engine::get_singleton()->is_editor_hint() && p_node->is_inside_tree() && p_node->get_tree()->get_edited_scene_root() && p_node->get_tree()->get_edited_scene_root()->get_parent()->is_a_parent_of(p_node) && Object::cast_to(p_node)) { - layers_in_scene_list_cache_needs_update = true; } } @@ -3807,10 +3806,10 @@ void LayeredTileMapLayerEditor::_notification(int p_what) { case NOTIFICATION_READY: { get_tree()->connect("node_added", this, "_node_change"); get_tree()->connect("node_removed", this, "_node_change"); - + layers_in_scene_list_cache_needs_update = true; } break; - + case NOTIFICATION_THEME_CHANGED: { missing_tile_texture = get_theme_icon("StatusWarning", "EditorIcons"); warning_pattern_texture = get_theme_icon("WarningPattern", "EditorIcons"); @@ -3851,9 +3850,9 @@ void LayeredTileMapLayerEditor::_bind_methods() { ClassDB::bind_method(D_METHOD("_on_grid_toggled"), &LayeredTileMapLayerEditor::_on_grid_toggled); ClassDB::bind_method(D_METHOD("_advanced_menu_button_id_pressed"), &LayeredTileMapLayerEditor::_advanced_menu_button_id_pressed); ClassDB::bind_method(D_METHOD("_move_tile_map_array_element"), &LayeredTileMapLayerEditor::_move_tile_map_array_element); - + ClassDB::bind_method(D_METHOD("_node_change"), &LayeredTileMapLayerEditor::_node_change); - + ClassDB::bind_method(D_METHOD("_select_previous_layer_pressed"), &LayeredTileMapLayerEditor::_select_previous_layer_pressed); ClassDB::bind_method(D_METHOD("_select_next_layer_pressed"), &LayeredTileMapLayerEditor::_select_next_layer_pressed); ClassDB::bind_method(D_METHOD("_select_all_layers_pressed"), &LayeredTileMapLayerEditor::_select_all_layers_pressed); @@ -3881,7 +3880,7 @@ void LayeredTileMapLayerEditor::_select_all_layers_pressed() { if (tile_map_layers_in_scene_cache.size() == 0) { return; } - + EditorNode *en = EditorNode::get_singleton(); Node *edited_scene_root = en->get_edited_scene(); ERR_FAIL_NULL(edited_scene_root); @@ -3984,7 +3983,7 @@ void LayeredTileMapLayerEditor::_clear_all_layers_highlighting() { _update_tile_map_layers_in_scene_list_cache(); for (int i = 0; i < tile_map_layers_in_scene_cache.size(); ++i) { LayeredTileMapLayer *layer = tile_map_layers_in_scene_cache[i]; - + layer->set_highlight_mode(LayeredTileMapLayer::HIGHLIGHT_MODE_DEFAULT); } } @@ -4029,7 +4028,7 @@ void LayeredTileMapLayerEditor::_update_all_layers_highlighting() { bool passed = false; for (int i = 0; i < tile_map_layers_in_scene_cache.size(); ++i) { LayeredTileMapLayer *layer = tile_map_layers_in_scene_cache[i]; - + if (layer == edited_layer) { passed = true; layer->set_highlight_mode(LayeredTileMapLayer::HIGHLIGHT_MODE_DEFAULT); @@ -4047,13 +4046,13 @@ void LayeredTileMapLayerEditor::_update_all_layers_highlighting() { void LayeredTileMapLayerEditor::_highlight_selected_layer_button_toggled(bool p_pressed) { LayeredTileMapLayer *edited_layer = _get_edited_layer(); - + if (!edited_layer) { return; } EditorSettings::get_singleton()->set("editors/layered_tiles_editor/highlight_selected_layer", p_pressed); - + if (p_pressed) { _update_all_layers_highlighting(); } else { @@ -4117,7 +4116,7 @@ void LayeredTileMapLayerEditor::_advanced_menu_button_id_pressed(int p_id) { List prop_list; tile_map->get_property_list(&prop_list); - + for (List::Element *E = prop_list.front(); E; E = E->next()) { undo_redo->add_undo_property(tile_map, E->get().name, tile_map->get(E->get().name)); } @@ -4128,7 +4127,7 @@ void LayeredTileMapLayerEditor::_advanced_menu_button_id_pressed(int p_id) { void LayeredTileMapLayerEditor::_update_bottom_panel() { const LayeredTileMapLayer *edited_layer = _get_edited_layer(); - + Ref tile_set; if (edited_layer) { tile_set = edited_layer->get_tile_set(); @@ -4150,7 +4149,7 @@ void LayeredTileMapLayerEditor::_update_bottom_panel() { } else { cant_edit_label->hide(); } - + // Update tabs visibility. for (uint32_t i = 0; i < tabs_data.size(); ++i) { LayeredTileMapLayerSubEditorPlugin::TabData &tab_data = tabs_data[i]; @@ -4292,7 +4291,7 @@ void LayeredTileMapLayerEditor::_layers_select_next_or_previous(bool p_next) { } else { // Individual layer. _update_tile_map_layers_in_scene_list_cache(); - + int edited_index = -1; for (int i = 0; i < tile_map_layers_in_scene_cache.size(); i++) { if (tile_map_layers_in_scene_cache[i] == edited_layer) { @@ -4311,7 +4310,6 @@ void LayeredTileMapLayerEditor::_layers_select_next_or_previous(bool p_next) { en->get_editor_selection()->clear(); en->get_editor_selection()->add_node(new_selected_layer); } else { - edit(new_selected_layer); } } @@ -4537,7 +4535,7 @@ void LayeredTileMapLayerEditor::edit(Object *p_edited) { if (p_edited && p_edited->get_instance_id() == edited_tile_map_layer_id) { return; } - + _clear_all_layers_highlighting(); // Disconnect to changes. @@ -4568,7 +4566,7 @@ void LayeredTileMapLayerEditor::edit(Object *p_edited) { // Call the plugins and update everything. tabs_plugins[tabs_bar->get_current_tab()]->edit(edited_tile_map_layer_id); - + _update_layers_selector(); _update_all_layers_highlighting(); @@ -4631,7 +4629,7 @@ LayeredTileMapLayerEditor::LayeredTileMapLayerEditor() { // Layer selector. layer_selection_hbox = memnew(HBoxContainer); tile_map_toolbar->add_child(layer_selection_hbox); - + layers_selection_button = memnew(OptionButton); layers_selection_button->set_custom_minimum_size(Size2(200, 0)); layers_selection_button->set_tooltip(TTR("LayeredTileMap Layers")); diff --git a/modules/layered_tile_map/editor/layered_tile_map_layer_editor.h b/modules/layered_tile_map/editor/layered_tile_map_layer_editor.h index 88600ff8a..d0731270d 100644 --- a/modules/layered_tile_map/editor/layered_tile_map_layer_editor.h +++ b/modules/layered_tile_map/editor/layered_tile_map_layer_editor.h @@ -369,7 +369,7 @@ private: // Toolbar. HFlowContainer *tile_map_toolbar = nullptr; - + bool show_layers_selector = false; HBoxContainer *layer_selection_hbox = nullptr; @@ -390,7 +390,7 @@ private: Button *toggle_grid_button = nullptr; void _on_grid_toggled(bool p_pressed); - + enum { ADVANCED_MENU_REPLACE_WITH_PROXIES, ADVANCED_MENU_EXTRACT_TILE_MAP_LAYERS, diff --git a/modules/layered_tile_map/editor/layered_tile_set_editor.cpp b/modules/layered_tile_map/editor/layered_tile_set_editor.cpp index 487818109..63737b970 100644 --- a/modules/layered_tile_map/editor/layered_tile_set_editor.cpp +++ b/modules/layered_tile_map/editor/layered_tile_set_editor.cpp @@ -1024,7 +1024,7 @@ void LayeredTileSourceInspectorPlugin::_show_id_edit_dialog(Object *p_for_source } edited_source = p_for_source; id_input->set_value(p_for_source->get("id")); - + //id_edit_dialog->popup_centered(Vector2i(400, 0) * EDSCALE); id_edit_dialog->popup_centered(); diff --git a/modules/layered_tile_map/editor/layered_tile_set_scenes_collection_source_editor.h b/modules/layered_tile_map/editor/layered_tile_set_scenes_collection_source_editor.h index 41d96105a..9178259a8 100644 --- a/modules/layered_tile_map/editor/layered_tile_set_scenes_collection_source_editor.h +++ b/modules/layered_tile_map/editor/layered_tile_set_scenes_collection_source_editor.h @@ -135,7 +135,7 @@ private: void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from); bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const; - + void _tile_proxy_object_changed(const String &p_what); void _scene_tiles_list_item_selected(int p_index); diff --git a/modules/layered_tile_map/editor/layered_tiles_editor_plugin.cpp b/modules/layered_tile_map/editor/layered_tiles_editor_plugin.cpp index 6740d6df4..f4f1ffb27 100644 --- a/modules/layered_tile_map/editor/layered_tiles_editor_plugin.cpp +++ b/modules/layered_tile_map/editor/layered_tiles_editor_plugin.cpp @@ -41,6 +41,7 @@ #include "editor/editor_node.h" #include "editor/editor_scale.h" #include "editor/editor_settings.h" +#include "editor/multi_node_edit.h" #include "editor/plugins/canvas_item_editor_plugin.h" #include "scene/gui/box_container.h" #include "scene/gui/button.h" @@ -49,7 +50,6 @@ #include "scene/main/control.h" #include "scene/main/viewport.h" #include "scene/resources/texture.h" -#include "editor/multi_node_edit.h" LayeredTilesEditorUtils *LayeredTilesEditorUtils::singleton = nullptr; LayeredTileMapEditorPlugin *tile_map_plugin_singleton = nullptr; @@ -376,7 +376,7 @@ void LayeredTileMapEditorPlugin::_select_layer(const StringName &p_name) { ERR_FAIL_NULL(edited_layer); Node *parent = edited_layer->get_parent(); - + if (parent) { LayeredTileMapLayer *new_layer = Object::cast_to(parent->get_node_or_null(String(p_name))); edit(new_layer); @@ -387,7 +387,7 @@ void LayeredTileMapEditorPlugin::_edit_tile_map_layer(LayeredTileMapLayer *p_til ERR_FAIL_NULL(p_tile_map_layer); editor->edit(p_tile_map_layer); - + editor->set_show_layer_selector(p_show_layer_selector); // Update the object IDs. @@ -445,12 +445,12 @@ void LayeredTileMapEditorPlugin::edit(Object *p_object) { LayeredTileMap *tile_map = Object::cast_to(p_object); LayeredTileMapLayer *tile_map_layer = Object::cast_to(p_object); - + MultiNodeEdit *multi_node_edit = Object::cast_to(p_object); if (tile_map) { _edit_tile_map(tile_map); } else if (tile_map_layer) { - _edit_tile_map_layer(tile_map_layer, false); + _edit_tile_map_layer(tile_map_layer, false); } else if (multi_node_edit) { editor->edit(multi_node_edit); } else { diff --git a/modules/layered_tile_map/editor/theme_changed_notifier.h b/modules/layered_tile_map/editor/theme_changed_notifier.h index 1de2d4f74..caf12fdd7 100644 --- a/modules/layered_tile_map/editor/theme_changed_notifier.h +++ b/modules/layered_tile_map/editor/theme_changed_notifier.h @@ -40,7 +40,7 @@ class ThemeChangedNotifier : public Control { protected: void _notification(int p_what); static void _bind_methods(); - + public: ThemeChangedNotifier(); ~ThemeChangedNotifier(); diff --git a/modules/layered_tile_map/geometry_parser/layered_tilemap_navigation_geometry_parser_2d.cpp b/modules/layered_tile_map/geometry_parser/layered_tilemap_navigation_geometry_parser_2d.cpp index daa9904fc..4cea2923b 100644 --- a/modules/layered_tile_map/geometry_parser/layered_tilemap_navigation_geometry_parser_2d.cpp +++ b/modules/layered_tile_map/geometry_parser/layered_tilemap_navigation_geometry_parser_2d.cpp @@ -46,7 +46,6 @@ bool LayeredTileMap2DNavigationGeometryParser2D::parses_node(Node *p_node) { } void LayeredTileMap2DNavigationGeometryParser2D::parse_geometry(Node *p_node, Ref p_navigation_polygon, Ref p_source_geometry) { - LayeredTileMap *tilemap = Object::cast_to(p_node); NavigationPolygon::ParsedGeometryType parsed_geometry_type = p_navigation_polygon->get_parsed_geometry_type(); uint32_t navigation_polygon_collision_mask = p_navigation_polygon->get_collision_mask(); diff --git a/modules/layered_tile_map/layered_tile_map.cpp b/modules/layered_tile_map/layered_tile_map.cpp index d7b3e97aa..f95ad443a 100644 --- a/modules/layered_tile_map/layered_tile_map.cpp +++ b/modules/layered_tile_map/layered_tile_map.cpp @@ -33,9 +33,9 @@ #include "core/config/engine.h" #include "core/core_string_names.h" +#include "core/io/marshalls.h" #include "layered_tile_map_layer.h" #include "scene/main/control.h" -#include "core/io/marshalls.h" #define TILEMAP_CALL_FOR_LAYER(layer, function, ...) \ if (layer < 0) { \ @@ -383,7 +383,7 @@ void LayeredTileMap::add_layer(int p_to_pos) { move_child(new_layer, 0); new_layer->set_name(vformat("Layer%d", p_to_pos)); new_layer->set_tile_set(tile_set); - + #ifdef MODULE_VERTEX_LIGHTS_2D_ENABLED new_layer->set_use_vertex_lights(get_use_vertex_lights()); #endif @@ -393,7 +393,7 @@ void LayeredTileMap::add_layer(int p_to_pos) { new_layer->rao_set_strength(rao_get_strength()); new_layer->rao_set_noise_params(rao_get_noise_params()); #endif - + move_child(new_layer, p_to_pos); for (uint32_t i = 0; i < layers.size(); i++) { layers[i]->set_as_tile_map_internal_node(i); @@ -436,7 +436,7 @@ void LayeredTileMap::remove_layer(int p_layer) { layers.remove(p_layer); remove_child(removed); removed->queue_delete(); - + for (uint32_t i = 0; i < layers.size(); i++) { layers[i]->set_as_tile_map_internal_node(i); } @@ -1284,7 +1284,7 @@ void LayeredTileMap::_bind_methods() { ClassDB::bind_method(D_METHOD("move_layer", "layer", "to_position"), &LayeredTileMap::move_layer); ClassDB::bind_method(D_METHOD("remove_layer", "layer"), &LayeredTileMap::remove_layer); ClassDB::bind_method(D_METHOD("get_layer", "layer"), &LayeredTileMap::get_layer); - + ClassDB::bind_method(D_METHOD("set_layer_name", "layer", "name"), &LayeredTileMap::set_layer_name); ClassDB::bind_method(D_METHOD("get_layer_name", "layer"), &LayeredTileMap::get_layer_name); ClassDB::bind_method(D_METHOD("set_layer_enabled", "layer", "enabled"), &LayeredTileMap::set_layer_enabled); @@ -1359,7 +1359,7 @@ void LayeredTileMap::_bind_methods() { ClassDB::bind_method(D_METHOD("_emit_changed"), &LayeredTileMap::_emit_changed); ClassDB::bind_method(D_METHOD("_tile_set_changed"), &LayeredTileMap::_tile_set_changed); - + ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "tile_set", PROPERTY_HINT_RESOURCE_TYPE, "LayeredTileSet"), "set_tileset", "get_tileset"); ADD_PROPERTY(PropertyInfo(Variant::INT, "rendering_quadrant_size", PROPERTY_HINT_RANGE, "1,128,1"), "set_rendering_quadrant_size", "get_rendering_quadrant_size"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "collision_animatable"), "set_collision_animatable", "is_collision_animatable"); diff --git a/modules/layered_tile_map/layered_tile_map.h b/modules/layered_tile_map/layered_tile_map.h index 73cefad75..8e9469441 100644 --- a/modules/layered_tile_map/layered_tile_map.h +++ b/modules/layered_tile_map/layered_tile_map.h @@ -104,7 +104,7 @@ private: void _tile_set_changed(); void _emit_changed(); - + // Kept for compatibility with TileMap. With TileMapLayers as individual nodes, the format is stored directly in the array. void _set_tile_map_data_using_compatibility_format(int p_layer, LayeredTileMapDataFormat p_format, const Vector &p_data); Vector _get_tile_map_data_using_compatibility_format(int p_layer) const; @@ -205,7 +205,7 @@ public: #ifdef MODULE_FASTNOISE_ENABLED void rao_set_use(bool p_rao); bool rao_get_use() const; - + void rao_set_strength(const real_t p_strength); real_t rao_get_strength() const; diff --git a/modules/layered_tile_map/layered_tile_map_layer.cpp b/modules/layered_tile_map/layered_tile_map_layer.cpp index 522b95af8..eeddf453a 100644 --- a/modules/layered_tile_map/layered_tile_map_layer.cpp +++ b/modules/layered_tile_map/layered_tile_map_layer.cpp @@ -1761,7 +1761,7 @@ void LayeredTileMapLayer::_internal_update(bool p_force_cleanup) { // Clear the dirty cells list. dirty.cell_list.clear(); - + pending_update = false; } @@ -1883,7 +1883,6 @@ void LayeredTileMapLayer::_bind_methods() { ClassDB::bind_method(D_METHOD("set_navigation_visibility_mode", "show_navigation"), &LayeredTileMapLayer::set_navigation_visibility_mode); ClassDB::bind_method(D_METHOD("get_navigation_visibility_mode"), &LayeredTileMapLayer::get_navigation_visibility_mode); - BIND_VMETHOD(MethodInfo(Variant::BOOL, "_use_tile_data_runtime_update", PropertyInfo(Variant::VECTOR2I, "coords"))); @@ -1897,12 +1896,12 @@ void LayeredTileMapLayer::_bind_methods() { ClassDB::bind_method(D_METHOD("_deferred_internal_update"), &LayeredTileMapLayer::_deferred_internal_update); ClassDB::bind_method(D_METHOD("_renamed"), &LayeredTileMapLayer::_renamed); ClassDB::bind_method(D_METHOD("_tile_set_changed"), &LayeredTileMapLayer::_tile_set_changed); - + ADD_PROPERTY(PropertyInfo(Variant::POOL_BYTE_ARRAY, "tile_map_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "set_tile_map_data_from_array", "get_tile_map_data_as_array"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "enabled"), "set_enabled", "is_enabled"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "tile_set", PROPERTY_HINT_RESOURCE_TYPE, "LayeredTileSet"), "set_tile_set", "get_tile_set"); - + //VertexLights2D #ifdef MODULE_VERTEX_LIGHTS_2D_ENABLED ClassDB::bind_method(D_METHOD("set_use_vertex_lights", "value"), &LayeredTileMapLayer::set_use_vertex_lights); @@ -1926,7 +1925,7 @@ void LayeredTileMapLayer::_bind_methods() { ClassDB::bind_method(D_METHOD("rao_get_noise_params"), &LayeredTileMapLayer::rao_get_noise_params); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "rao_noise_params", PROPERTY_HINT_RESOURCE_TYPE, "FastnoiseNoiseParams"), "rao_set_noise_params", "rao_get_noise_params"); #endif - + ADD_GROUP("Rendering", ""); ADD_PROPERTY(PropertyInfo(Variant::INT, "y_sort_origin"), "set_y_sort_origin", "get_y_sort_origin"); ADD_PROPERTY(PropertyInfo(Variant::INT, "rendering_quadrant_size"), "set_rendering_quadrant_size", "get_rendering_quadrant_size"); @@ -1939,12 +1938,12 @@ void LayeredTileMapLayer::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "navigation_visibility_mode", PROPERTY_HINT_ENUM, "Default,Force Show,Force Hide"), "set_navigation_visibility_mode", "get_navigation_visibility_mode"); ADD_SIGNAL(MethodInfo(CoreStringNames::get_singleton()->changed)); - + //VertexLights2D #ifdef MODULE_VERTEX_LIGHTS_2D_ENABLED ClassDB::bind_method(D_METHOD("_on_vertex_lights_map_changed"), &LayeredTileMapLayer::_on_vertex_lights_map_changed); #endif - + ADD_PROPERTY_DEFAULT("tile_map_data_format", LayeredTileMapLayerDataFormat::LAYERED_TILE_MAP_LAYER_DATA_FORMAT_0); BIND_ENUM_CONSTANT(DEBUG_VISIBILITY_MODE_DEFAULT); @@ -2307,7 +2306,7 @@ HashMap LayeredTileMapLayer::terrain_ } LayeredTileMapCell LayeredTileMapLayer::get_cell(const Vector2i &p_coords) const { - const HashMap::Element* E = tile_map_layer_data.find(p_coords); + const HashMap::Element *E = tile_map_layer_data.find(p_coords); if (!E) { return LayeredTileMapCell(); @@ -2498,7 +2497,6 @@ Rect2i LayeredTileMapLayer::get_used_rect() const { return used_rect_cache; } - Ref LayeredTileMapLayer::get_pattern(PoolVector2iArray p_coords_array) { ERR_FAIL_COND_V(!tile_set.is_valid(), nullptr); diff --git a/modules/layered_tile_map/layered_tile_map_layer.h b/modules/layered_tile_map/layered_tile_map_layer.h index 57e4a57d4..3e889a602 100644 --- a/modules/layered_tile_map/layered_tile_map_layer.h +++ b/modules/layered_tile_map/layered_tile_map_layer.h @@ -255,7 +255,7 @@ public: enum DirtyFlags { DIRTY_FLAGS_LAYER_ENABLED = 0, - + DIRTY_FLAGS_LAYER_IN_TREE, DIRTY_FLAGS_LAYER_IN_CANVAS, DIRTY_FLAGS_LAYER_LOCAL_TRANSFORM, @@ -289,7 +289,7 @@ public: DIRTY_FLAGS_LAYER_GROUP_SELECTED_LAYERS, DIRTY_FLAGS_LAYER_GROUP_HIGHLIGHT_SELECTED, - + DIRTY_FLAGS_TILE_SET, DIRTY_FLAGS_MAX, @@ -298,16 +298,16 @@ public: private: // Properties. HashMap tile_map_layer_data; - + bool enabled = true; - + Ref tile_set; HighlightMode highlight_mode = HIGHLIGHT_MODE_DEFAULT; - + int y_sort_origin = 0; int rendering_quadrant_size = 16; - + bool collision_enabled = true; bool use_kinematic_bodies = false; DebugVisibilityMode collision_visibility_mode = DEBUG_VISIBILITY_MODE_DEFAULT; @@ -418,7 +418,7 @@ private: void _queue_internal_update(); void _deferred_internal_update(); void _internal_update(bool p_force_cleanup); - + //VertexLights2D #ifdef MODULE_VERTEX_LIGHTS_2D_ENABLED void _on_vertex_lights_map_changed(RID map); @@ -426,13 +426,13 @@ private: protected: void _notification(int p_what); - + static void _bind_methods(); public: // LayeredTileMap node. void set_as_tile_map_internal_node(int p_index); - + int get_index_in_tile_map() const { return layer_index_in_tile_map_node; } @@ -461,7 +461,7 @@ public: void fix_invalid_tiles(); void clear(); - + int get_cell_source_id(const Vector2i &p_coords) const; Vector2i get_cell_atlas_coords(const Vector2i &p_coords) const; int get_cell_alternative_tile(const Vector2i &p_coords) const; @@ -505,7 +505,7 @@ public: void set_highlight_mode(HighlightMode p_highlight_mode); HighlightMode get_highlight_mode() const; - + virtual void set_self_modulate(const Color &p_self_modulate); virtual void set_y_sort_enabled(bool p_y_sort_enabled); void set_y_sort_origin(int p_y_sort_origin); @@ -528,7 +528,7 @@ public: RID get_navigation_map() const; void set_navigation_visibility_mode(DebugVisibilityMode p_show_navigation); DebugVisibilityMode get_navigation_visibility_mode() const; - + // Virtual function to modify the LayeredTileData at runtime. bool use_tile_data_runtime_update(const Vector2i &p_coords); void tile_data_runtime_update(const Vector2i &p_coords, LayeredTileData *p_tile_data); @@ -543,7 +543,7 @@ public: #ifdef MODULE_FASTNOISE_ENABLED void rao_set_use(bool p_rao); bool rao_get_use() const; - + void rao_set_strength(const real_t p_strength); real_t rao_get_strength() const; @@ -551,11 +551,11 @@ public: Ref rao_get_noise_params(); void rao_setup_noise(Ref noise); - + Ref rao_get_noise(); void rao_set_noise(const Ref &noise); #endif - + LayeredTileMapLayer(); ~LayeredTileMapLayer(); }; diff --git a/modules/layered_tile_map/layered_tile_set.cpp b/modules/layered_tile_map/layered_tile_set.cpp index 3a2377c2e..42dbf668d 100644 --- a/modules/layered_tile_map/layered_tile_set.cpp +++ b/modules/layered_tile_map/layered_tile_set.cpp @@ -1436,7 +1436,7 @@ int LayeredTileSet::get_patterns_count() { RBSet LayeredTileSet::get_terrains_pattern_set(int p_terrain_set) const { ERR_FAIL_INDEX_V(p_terrain_set, terrain_sets.size(), RBSet()); - const_cast(this)->_update_terrains_cache(); + const_cast(this)->_update_terrains_cache(); RBSet output; @@ -1452,15 +1452,15 @@ RBSet LayeredTileSet::get_terrains_pattern_set( RBSet LayeredTileSet::get_tiles_for_terrains_pattern(int p_terrain_set, TerrainsPattern p_terrain_tile_pattern) const { ERR_FAIL_INDEX_V(p_terrain_set, terrain_sets.size(), RBSet()); - const_cast(this)->_update_terrains_cache(); + const_cast(this)->_update_terrains_cache(); return per_terrain_pattern_tiles[p_terrain_set][p_terrain_tile_pattern]; } LayeredTileMapCell LayeredTileSet::get_random_tile_from_terrains_pattern(int p_terrain_set, LayeredTileSet::TerrainsPattern p_terrain_tile_pattern) const { ERR_FAIL_INDEX_V(p_terrain_set, terrain_sets.size(), LayeredTileMapCell()); - - const_cast(this)->_update_terrains_cache(); + + const_cast(this)->_update_terrains_cache(); // Count the sum of probabilities. double sum = 0.0; @@ -1509,7 +1509,6 @@ LayeredTileMapCell LayeredTileSet::get_random_tile_from_terrains_pattern(int p_t ERR_FAIL_V(LayeredTileMapCell()); } - Vector LayeredTileSet::get_tile_shape_polygon() const { Vector points; if (tile_shape == LayeredTileSet::TILE_SHAPE_SQUARE) { diff --git a/modules/layered_tile_map/layered_tile_set.h b/modules/layered_tile_map/layered_tile_set.h index ff9de41e7..c791929e2 100644 --- a/modules/layered_tile_map/layered_tile_set.h +++ b/modules/layered_tile_map/layered_tile_set.h @@ -618,7 +618,7 @@ public: TRANSFORM_FLIP_V = 1 << 13, TRANSFORM_TRANSPOSE = 1 << 14, }; - + static const int16_t UNTRANSFORM_MASK = ~(LayeredTileSetAtlasSource::TRANSFORM_FLIP_H + LayeredTileSetAtlasSource::TRANSFORM_FLIP_V + LayeredTileSetAtlasSource::TRANSFORM_TRANSPOSE); private: diff --git a/modules/layered_tile_map/register_types.cpp b/modules/layered_tile_map/register_types.cpp index 253140041..fb07cf591 100644 --- a/modules/layered_tile_map/register_types.cpp +++ b/modules/layered_tile_map/register_types.cpp @@ -34,8 +34,8 @@ #include "geometry_parser/layered_tilemap_navigation_geometry_parser_2d.h" #include "servers/navigation/navigation_mesh_generator.h" -#include "layered_tile_map_layer.h" #include "layered_tile_map.h" +#include "layered_tile_map_layer.h" #include "layered_tile_set.h" #ifdef TOOLS_ENABLED diff --git a/modules/material_maker/nodes/mm_node.cpp b/modules/material_maker/nodes/mm_node.cpp index f03dc49d1..35d9a2b44 100644 --- a/modules/material_maker/nodes/mm_node.cpp +++ b/modules/material_maker/nodes/mm_node.cpp @@ -195,7 +195,7 @@ void MMNode::register_input_property(const Ref &p_prop) if (!prop->is_connected("changed", this, "on_input_property_changed")) { prop->connect("changed", this, "on_input_property_changed"); } - + input_properties.erase(prop); input_properties.push_back(prop); } @@ -218,7 +218,7 @@ void MMNode::register_output_property(const Ref &p_prop Ref prop = p_prop; prop->set_owner(this); - + output_properties.erase(prop); output_properties.push_back(prop); } diff --git a/modules/material_maker/nodes/simple/image.cpp b/modules/material_maker/nodes/simple/image.cpp index 0ba09b11c..6e1faef87 100644 --- a/modules/material_maker/nodes/simple/image.cpp +++ b/modules/material_maker/nodes/simple/image.cpp @@ -52,7 +52,7 @@ String MMImage::get_image_path() { void MMImage::set_image_path(const String &val) { image_path = val; Ref img; - + if (image_path != "") { img.instance(); ImageLoader::load_image(image_path, img); diff --git a/modules/props/lights/prop_light.cpp b/modules/props/lights/prop_light.cpp index 89bce6b9d..2f670bd63 100644 --- a/modules/props/lights/prop_light.cpp +++ b/modules/props/lights/prop_light.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* prop.cpp */ +/* prop_light.cpp */ /*************************************************************************/ /* This file is part of: */ /* PANDEMONIUM ENGINE */ diff --git a/modules/props/prop_merge_group.h b/modules/props/prop_merge_group.h index 0d2b5c0da..e2f04b140 100644 --- a/modules/props/prop_merge_group.h +++ b/modules/props/prop_merge_group.h @@ -56,13 +56,13 @@ public: bool get_is_merger(); void set_is_merger(bool value); - + PropMergeGroup(); ~PropMergeGroup(); protected: static void _bind_methods(); - + bool _is_merger; Vector> _materials; }; diff --git a/modules/skeleton_3d/editor/skeleton_editor_plugin.cpp b/modules/skeleton_3d/editor/skeleton_editor_plugin.cpp index 6ff2d7326..7341ce135 100644 --- a/modules/skeleton_3d/editor/skeleton_editor_plugin.cpp +++ b/modules/skeleton_3d/editor/skeleton_editor_plugin.cpp @@ -1218,7 +1218,7 @@ void SkeletonEditor::copy_pose() { if (!skeleton) { return; } - + _pose_clipboard.clear(); for (int i = 0; i < skeleton->get_bone_count(); ++i) { @@ -1230,9 +1230,9 @@ void SkeletonEditor::paste_pose() { if (!skeleton) { return; } - + ERR_FAIL_COND(skeleton->get_bone_count() != _pose_clipboard.size()); - + for (int i = 0; i < skeleton->get_bone_count(); ++i) { skeleton->set_bone_pose(i, _pose_clipboard[i]); } diff --git a/modules/skeleton_3d/editor/skeleton_editor_plugin.h b/modules/skeleton_3d/editor/skeleton_editor_plugin.h index 6e031cc51..66cf8083d 100644 --- a/modules/skeleton_3d/editor/skeleton_editor_plugin.h +++ b/modules/skeleton_3d/editor/skeleton_editor_plugin.h @@ -247,10 +247,10 @@ public: void _add_bone_callback(); void _remove_bone_callback(); void _rename_bone_callback(); - + void copy_pose(); void paste_pose(); - + Vector _pose_clipboard; void create_bone_tool_popups(); diff --git a/modules/skeleton_3d/nodes/skeleton.cpp b/modules/skeleton_3d/nodes/skeleton.cpp index 9d7eb04a8..2862a2d08 100644 --- a/modules/skeleton_3d/nodes/skeleton.cpp +++ b/modules/skeleton_3d/nodes/skeleton.cpp @@ -364,7 +364,7 @@ void Skeleton::_notification(int p_what) { if (modification_stack.is_valid()) { execute_modifications(get_process_delta_time(), SkeletonModificationStack3D::EXECUTION_MODE::execution_mode_process); } - + if (dirty) { _notification(NOTIFICATION_UPDATE_SKELETON); } diff --git a/modules/vertex_lights_2d/vertex_light_2d.cpp b/modules/vertex_lights_2d/vertex_light_2d.cpp index d870871d8..79c547edf 100644 --- a/modules/vertex_lights_2d/vertex_light_2d.cpp +++ b/modules/vertex_lights_2d/vertex_light_2d.cpp @@ -133,7 +133,7 @@ void VertexLight2D::_notification(int p_what) { ERR_FAIL_COND(!world.is_valid()); RID map = world->get_vertex_lights_2d_map(); VertexLights2DServer::get_singleton()->light_set_map(_vertex_light, map); - + VertexLights2DServer::get_singleton()->light_set_position(_vertex_light, get_global_transform().get_origin()); _update_light_visibility(); diff --git a/modules/vertex_lights_2d/vertex_light_2d.h b/modules/vertex_lights_2d/vertex_light_2d.h index a181884b0..6b850ead9 100644 --- a/modules/vertex_lights_2d/vertex_light_2d.h +++ b/modules/vertex_lights_2d/vertex_light_2d.h @@ -2,7 +2,7 @@ #define VERTEX_LIGHT_2D_H /*************************************************************************/ -/* vertex_2d.h */ +/* vertex_light_2d.h */ /*************************************************************************/ /* This file is part of: */ /* PANDEMONIUM ENGINE */ diff --git a/modules/vertex_lights_2d/vertex_light_2d_environment.cpp b/modules/vertex_lights_2d/vertex_light_2d_environment.cpp index 03bbbe4a6..f516c1970 100644 --- a/modules/vertex_lights_2d/vertex_light_2d_environment.cpp +++ b/modules/vertex_lights_2d/vertex_light_2d_environment.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* vertex_light_2d.cpp */ +/* vertex_light_2d_environment.cpp */ /*************************************************************************/ /* This file is part of: */ /* PANDEMONIUM ENGINE */ diff --git a/modules/vertex_lights_2d/vertex_light_2d_environment.h b/modules/vertex_lights_2d/vertex_light_2d_environment.h index 7bb91125b..df29843d1 100644 --- a/modules/vertex_lights_2d/vertex_light_2d_environment.h +++ b/modules/vertex_lights_2d/vertex_light_2d_environment.h @@ -2,7 +2,7 @@ #define VERTEX_LIGHT_2D_ENVIRONMENT_H /*************************************************************************/ -/* vertex_2d.h */ +/* vertex_light_2d_environment.h */ /*************************************************************************/ /* This file is part of: */ /* PANDEMONIUM ENGINE */ diff --git a/modules/vertex_lights_2d/vertex_light_data.cpp b/modules/vertex_lights_2d/vertex_light_data.cpp index 8c9b397c9..807535a69 100644 --- a/modules/vertex_lights_2d/vertex_light_data.cpp +++ b/modules/vertex_lights_2d/vertex_light_data.cpp @@ -44,7 +44,7 @@ Color VertexLights2DServer::VertexLightQuadrant2D::sample_light(const Color &p_c for (uint32_t i = 0; i < lights.size(); ++i) { VertexLightData2D *l = lights[i]; - + if (!l->enabled) { continue; } @@ -60,13 +60,13 @@ Color VertexLights2DServer::VertexLightQuadrant2D::sample_light(const Color &p_c if (p_layer < l->layer_range.x || p_layer > l->layer_range.y) { continue; } - + if (p_z_index < l->z_range.x || p_z_index > l->z_range.y) { continue; } - + Vector2 light_to_pos = p_position - l->position; - + Vector2 light_to_pos_normal_space = light_to_pos; light_to_pos_normal_space.x /= static_cast(l->range.x); light_to_pos_normal_space.y /= static_cast(l->range.y); @@ -77,7 +77,7 @@ Color VertexLights2DServer::VertexLightQuadrant2D::sample_light(const Color &p_c if (ltpnsl >= 1) { continue; } - + real_t attenuation = pow(1.0 - ltpnsl, l->attenuation); Color ac = l->color * attenuation; @@ -93,10 +93,10 @@ Color VertexLights2DServer::VertexLightQuadrant2D::sample_light(const Color &p_c c = c.blend(ac); } break; } - + c = c.clamp(); } - + return c; } @@ -191,14 +191,14 @@ Color VertexLights2DServer::VertexLightMap2D::sample_light(const Vector2 &p_posi Color c = base_color; Vector2i quadrant_position = to_quadrant_position(p_position); - + for (int x = quadrant_position.x - 1; x <= quadrant_position.x + 1; ++x) { for (int y = quadrant_position.y - 1; y <= quadrant_position.y + 1; ++y) { Vector2i qp = Vector2i(x, y); if (quadrants.has(qp)) { VertexLightQuadrant2D *q = quadrants[qp]; - + c = q->sample_light(c, p_position, p_item_cull_mask, p_layer, p_z_index); } } diff --git a/modules/vertex_lights_2d/vertex_lights_2d_server.cpp b/modules/vertex_lights_2d/vertex_lights_2d_server.cpp index e514ddd18..c6bd697e2 100644 --- a/modules/vertex_lights_2d/vertex_lights_2d_server.cpp +++ b/modules/vertex_lights_2d/vertex_lights_2d_server.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* vertex_lights_2d.cpp */ +/* vertex_lights_2d_server.cpp */ /*************************************************************************/ /* This file is part of: */ /* PANDEMONIUM ENGINE */ diff --git a/modules/vertex_lights_2d/vertex_lights_2d_server.h b/modules/vertex_lights_2d/vertex_lights_2d_server.h index 854b848ff..3bb419171 100644 --- a/modules/vertex_lights_2d/vertex_lights_2d_server.h +++ b/modules/vertex_lights_2d/vertex_lights_2d_server.h @@ -2,7 +2,7 @@ #define VERTEX_LIGHT_2D_SERVER_H /*************************************************************************/ -/* vertex_lights_2d.h */ +/* vertex_lights_2d_server.h */ /*************************************************************************/ /* This file is part of: */ /* PANDEMONIUM ENGINE */ @@ -64,7 +64,7 @@ public: Vector2i map_get_quadrant_size(RID p_map) const; void map_set_quadrant_size(RID p_map, const Vector2i &p_size); - + Color map_get_base_color(RID p_map) const; void map_set_base_color(RID p_map, const Color &p_base_color); @@ -113,7 +113,7 @@ public: // Rest void free(RID p_rid); - + void init(); void flush_notifications(); @@ -219,7 +219,7 @@ protected: _changed_maps.insert(p_light->map->self); } } - + _FORCE_INLINE_ void _light_enabled_changed(const VertexLightData2D *p_light) const { if (p_light && p_light->map) { _changed_maps.insert(p_light->map->self); diff --git a/modules/vertex_lights_3d/vertex_light_3d.cpp b/modules/vertex_lights_3d/vertex_light_3d.cpp index 8ed40f54a..3d4d0a2d0 100644 --- a/modules/vertex_lights_3d/vertex_light_3d.cpp +++ b/modules/vertex_lights_3d/vertex_light_3d.cpp @@ -113,7 +113,7 @@ void VertexLight3D::_notification(int p_what) { ERR_FAIL_COND(!world.is_valid()); RID map = world->get_vertex_lights_3d_map(); VertexLights3DServer::get_singleton()->light_set_map(_vertex_light, map); - + VertexLights3DServer::get_singleton()->light_set_position(_vertex_light, get_global_transform().get_origin()); _update_light_visibility(); diff --git a/modules/vertex_lights_3d/vertex_light_3d.h b/modules/vertex_lights_3d/vertex_light_3d.h index 8f33fd042..dedf53f86 100644 --- a/modules/vertex_lights_3d/vertex_light_3d.h +++ b/modules/vertex_lights_3d/vertex_light_3d.h @@ -2,7 +2,7 @@ #define VERTEX_LIGHT_3D_H /*************************************************************************/ -/* vertex_3d.h */ +/* vertex_light_3d.h */ /*************************************************************************/ /* This file is part of: */ /* PANDEMONIUM ENGINE */ diff --git a/modules/vertex_lights_3d/vertex_light_3d_environment.cpp b/modules/vertex_lights_3d/vertex_light_3d_environment.cpp index 5d983a5f5..eaa69884f 100644 --- a/modules/vertex_lights_3d/vertex_light_3d_environment.cpp +++ b/modules/vertex_lights_3d/vertex_light_3d_environment.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* vertex_light_3d.cpp */ +/* vertex_light_3d_environment.cpp */ /*************************************************************************/ /* This file is part of: */ /* PANDEMONIUM ENGINE */ diff --git a/modules/vertex_lights_3d/vertex_light_3d_environment.h b/modules/vertex_lights_3d/vertex_light_3d_environment.h index 73efffbbb..7d1e40db2 100644 --- a/modules/vertex_lights_3d/vertex_light_3d_environment.h +++ b/modules/vertex_lights_3d/vertex_light_3d_environment.h @@ -2,7 +2,7 @@ #define VERTEX_LIGHT_3D_ENVIRONMENT_H /*************************************************************************/ -/* vertex_3d.h */ +/* vertex_light_3d_environment.h */ /*************************************************************************/ /* This file is part of: */ /* PANDEMONIUM ENGINE */ diff --git a/modules/vertex_lights_3d/vertex_light_data.cpp b/modules/vertex_lights_3d/vertex_light_data.cpp index cb8de5f8d..4ffc940c4 100644 --- a/modules/vertex_lights_3d/vertex_light_data.cpp +++ b/modules/vertex_lights_3d/vertex_light_data.cpp @@ -57,7 +57,6 @@ Color VertexLights3DServer::VertexLightQuadrant3D::sample_light_value(const Colo continue; } - Vector3 light_to_pos = p_position - l->position; Vector3 light_to_pos_normal_space = light_to_pos; diff --git a/modules/vertex_lights_3d/vertex_lights_3d_server.cpp b/modules/vertex_lights_3d/vertex_lights_3d_server.cpp index 1a885a985..2babec009 100644 --- a/modules/vertex_lights_3d/vertex_lights_3d_server.cpp +++ b/modules/vertex_lights_3d/vertex_lights_3d_server.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* vertex_lights_3d.cpp */ +/* vertex_lights_3d_server.cpp */ /*************************************************************************/ /* This file is part of: */ /* PANDEMONIUM ENGINE */ diff --git a/modules/vertex_lights_3d/vertex_lights_3d_server.h b/modules/vertex_lights_3d/vertex_lights_3d_server.h index d3e540673..81836eae9 100644 --- a/modules/vertex_lights_3d/vertex_lights_3d_server.h +++ b/modules/vertex_lights_3d/vertex_lights_3d_server.h @@ -2,7 +2,7 @@ #define VERTEX_LIGHT_3D_SERVER_H /*************************************************************************/ -/* vertex_lights_3d.h */ +/* vertex_lights_3d_server.h */ /*************************************************************************/ /* This file is part of: */ /* PANDEMONIUM ENGINE */ @@ -64,7 +64,7 @@ public: Vector3i map_get_octant_size(RID p_map) const; void map_set_octant_size(RID p_map, const Vector3i &p_size); - + Color map_get_base_color(RID p_map) const; void map_set_base_color(RID p_map, const Color &p_base_color); @@ -108,7 +108,7 @@ public: // Rest void free(RID p_rid); - + void init(); void flush_notifications(); @@ -212,7 +212,7 @@ protected: _changed_maps.insert(p_light->map->self); } } - + _FORCE_INLINE_ void _light_enabled_changed(const VertexLightData3D *p_light) const { if (p_light && p_light->map) { _changed_maps.insert(p_light->map->self); diff --git a/modules/web/file_cache.h b/modules/web/file_cache.h index 9cb3765eb..b8208005c 100644 --- a/modules/web/file_cache.h +++ b/modules/web/file_cache.h @@ -57,7 +57,7 @@ public: //e.g. http://127.0.0.1/a/b/d.jpg -> /a/b/d.jpg bool wwwroot_has_file(const String &file_path); String wwwroot_get_file_abspath(const String &file_path); - + String wwwroot_get_simplified_abs_path(const String &file_path); bool get_cached_body(const String &path, String *body); diff --git a/platform/android/java/lib/src/org/pandemoniumengine/pandemonium/input/PandemoniumInputHandler.java b/platform/android/java/lib/src/org/pandemoniumengine/pandemonium/input/PandemoniumInputHandler.java index 28b9a85cb..3760c13c2 100644 --- a/platform/android/java/lib/src/org/pandemoniumengine/pandemonium/input/PandemoniumInputHandler.java +++ b/platform/android/java/lib/src/org/pandemoniumengine/pandemonium/input/PandemoniumInputHandler.java @@ -501,7 +501,7 @@ public class PandemoniumInputHandler implements InputManager.InputDeviceListener verticalFactor = event.getAxisValue(MotionEvent.AXIS_VSCROLL); horizontalFactor = event.getAxisValue(MotionEvent.AXIS_HSCROLL); } - + boolean sourceMouseRelative = false; if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) { sourceMouseRelative = event.isFromSource(InputDevice.SOURCE_MOUSE_RELATIVE); diff --git a/platform/frt/export/export.cpp b/platform/frt/export/export.cpp index b7e94002d..a24e0daae 100644 --- a/platform/frt/export/export.cpp +++ b/platform/frt/export/export.cpp @@ -36,7 +36,6 @@ #include "platform/frt/logo.gen.h" #include "scene/resources/texture.h" - class EditorExportPlatformFRT : public EditorExportPlatform { GDCLASS(EditorExportPlatformFRT, EditorExportPlatform); @@ -103,7 +102,6 @@ public: EditorExportPlatformFRT(); }; - ////////// void EditorExportPlatformFRT::get_preset_features(const Ref &p_preset, List *r_features) { @@ -338,8 +336,8 @@ String EditorExportPlatformFRT::get_preset_arch(const Ref &p if (arch != "arm32v6" && arch != "arm32v7" && arch != "arm64v8") { ERR_PRINT(vformat("Invalid value \"%s\" for \"binary_format/architecture\" in export preset \"%s\". Defaulting to \"arm32v6\".", - arch, - p_preset->get_name())); + arch, + p_preset->get_name())); arch = "arm32v6"; } @@ -352,9 +350,9 @@ void EditorExportPlatformFRT::add_platform_feature(const String &p_feature) { } void EditorExportPlatformFRT::get_platform_features(List *r_features) { - r_features->push_back("pc"); //all pcs support "pc" - r_features->push_back("s3tc"); //all pcs support "s3tc" compression - r_features->push_back(get_os_name()); //OS name is a feature + r_features->push_back("pc"); // all pcs support "pc" + r_features->push_back("s3tc"); // all pcs support "s3tc" compression + r_features->push_back(get_os_name()); // OS name is a feature for (RBSet::Element *E = extra_features.front(); E; E = E->next()) { r_features->push_back(E->get()); diff --git a/platform/frt/pandemonium_frt.cpp b/platform/frt/pandemonium_frt.cpp index 7e8b15cde..e1225f2e1 100644 --- a/platform/frt/pandemonium_frt.cpp +++ b/platform/frt/pandemonium_frt.cpp @@ -1,5 +1,5 @@ /*************************************************************************/ -/* pandemonium_frt.cpp */ +/* pandemonium_frt.cpp */ /*************************************************************************/ /* This file is part of: */ /* PANDEMONIUM ENGINE */ diff --git a/platform/frt_sdl/export/export.cpp b/platform/frt_sdl/export/export.cpp index f064e71fd..bce4740cb 100644 --- a/platform/frt_sdl/export/export.cpp +++ b/platform/frt_sdl/export/export.cpp @@ -36,7 +36,6 @@ #include "platform/frt_sdl/logo.gen.h" #include "scene/resources/texture.h" - class EditorExportPlatformFRTSDL : public EditorExportPlatform { GDCLASS(EditorExportPlatformFRTSDL, EditorExportPlatform); @@ -103,7 +102,6 @@ public: EditorExportPlatformFRTSDL(); }; - ////////// void EditorExportPlatformFRTSDL::get_preset_features(const Ref &p_preset, List *r_features) { @@ -338,7 +336,7 @@ String EditorExportPlatformFRTSDL::get_preset_arch(const Ref if (arch != "arm32v6" && arch != "arm32v7" && arch != "arm64v8") { ERR_PRINT(vformat("Invalid value \"%s\" for \"binary_format/architecture\" in export preset \"%s\". Defaulting to \"arm32v6\".", - arch, + arch, p_preset->get_name())); arch = "arm32v6"; diff --git a/scene/3d/lod.cpp b/scene/3d/lod.cpp index 41f9667e9..cf84b5d03 100644 --- a/scene/3d/lod.cpp +++ b/scene/3d/lod.cpp @@ -1,32 +1,33 @@ -/**************************************************************************/ -/* lod.cpp */ -/**************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/**************************************************************************/ -/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ -/* */ -/* 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. */ -/**************************************************************************/ +/*************************************************************************/ +/* lod.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* PANDEMONIUM ENGINE */ +/* https://github.com/Relintai/pandemonium_engine */ +/*************************************************************************/ +/* Copyright (c) 2022-present Péter Magyar. */ +/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */ +/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ +/* */ +/* 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 "lod.h" diff --git a/scene/3d/lod.h b/scene/3d/lod.h index 3a3cb9da6..f676aa83b 100644 --- a/scene/3d/lod.h +++ b/scene/3d/lod.h @@ -1,32 +1,33 @@ -/**************************************************************************/ -/* lod.h */ -/**************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/**************************************************************************/ -/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ -/* */ -/* 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. */ -/**************************************************************************/ +/*************************************************************************/ +/* lod.h */ +/*************************************************************************/ +/* This file is part of: */ +/* PANDEMONIUM ENGINE */ +/* https://github.com/Relintai/pandemonium_engine */ +/*************************************************************************/ +/* Copyright (c) 2022-present Péter Magyar. */ +/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */ +/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ +/* */ +/* 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 LOD_H #define LOD_H diff --git a/scene/3d/lod_manager.cpp b/scene/3d/lod_manager.cpp index ec3281625..6f8cfd83b 100644 --- a/scene/3d/lod_manager.cpp +++ b/scene/3d/lod_manager.cpp @@ -1,32 +1,33 @@ -/**************************************************************************/ -/* lod_manager.cpp */ -/**************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/**************************************************************************/ -/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ -/* */ -/* 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. */ -/**************************************************************************/ +/*************************************************************************/ +/* lod_manager.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* PANDEMONIUM ENGINE */ +/* https://github.com/Relintai/pandemonium_engine */ +/*************************************************************************/ +/* Copyright (c) 2022-present Péter Magyar. */ +/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */ +/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ +/* */ +/* 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 "lod_manager.h" diff --git a/scene/3d/lod_manager.h b/scene/3d/lod_manager.h index 0a0333870..bc9500de5 100644 --- a/scene/3d/lod_manager.h +++ b/scene/3d/lod_manager.h @@ -1,32 +1,33 @@ -/**************************************************************************/ -/* lod_manager.h */ -/**************************************************************************/ -/* This file is part of: */ -/* GODOT ENGINE */ -/* https://godotengine.org */ -/**************************************************************************/ -/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */ -/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ -/* */ -/* 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. */ -/**************************************************************************/ +/*************************************************************************/ +/* lod_manager.h */ +/*************************************************************************/ +/* This file is part of: */ +/* PANDEMONIUM ENGINE */ +/* https://github.com/Relintai/pandemonium_engine */ +/*************************************************************************/ +/* Copyright (c) 2022-present Péter Magyar. */ +/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */ +/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ +/* */ +/* 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 LOD_MANAGER_H #define LOD_MANAGER_H diff --git a/scene/resources/material/spatial_material.cpp b/scene/resources/material/spatial_material.cpp index ba66b3fe0..cf2523370 100644 --- a/scene/resources/material/spatial_material.cpp +++ b/scene/resources/material/spatial_material.cpp @@ -605,7 +605,6 @@ void SpatialMaterial::_update_shader() { } code += "\tALBEDO = albedo.rgb * albedo_tex.rgb;\n"; - if (orm) { if (textures[TEXTURE_ORM] != nullptr) { if (flags[FLAG_UV1_USE_TRIPLANAR]) { diff --git a/scene/resources/world_3d.cpp b/scene/resources/world_3d.cpp index 4238472e3..5199c9309 100644 --- a/scene/resources/world_3d.cpp +++ b/scene/resources/world_3d.cpp @@ -364,8 +364,6 @@ void World3D::notify_saving(bool p_active) { } void World3D::_bind_methods() { - - ClassDB::bind_method(D_METHOD("get_space"), &World3D::get_space); ClassDB::bind_method(D_METHOD("get_scenario"), &World3D::get_scenario); ClassDB::bind_method(D_METHOD("get_navigation_map"), &World3D::get_navigation_map); diff --git a/scene/resources/world_3d.h b/scene/resources/world_3d.h index b70a68124..0b6efe72b 100644 --- a/scene/resources/world_3d.h +++ b/scene/resources/world_3d.h @@ -83,7 +83,7 @@ public: RID get_space() const; RID get_scenario() const; RID get_navigation_map() const; - + // TODO Maybe World should have a callback on creation? RID get_vertex_lights_3d_map(); diff --git a/servers/rendering/rasterizer.h b/servers/rendering/rasterizer.h index d753dc770..0c6aee1f3 100644 --- a/servers/rendering/rasterizer.h +++ b/servers/rendering/rasterizer.h @@ -874,7 +874,7 @@ public: void update(real_t p_delta) { time_elapsed += p_delta; - + while (time_elapsed >= total_time) { time_elapsed -= total_time; } @@ -896,12 +896,12 @@ public: total_time = 0; type = TYPE_RECT_ANIMATION; } - + virtual ~CommandRectAnimation() { for (int i = 0; i < rects.size(); ++i) { memdelete(rects[i]); } - + rects.clear(); times.clear(); } diff --git a/servers/rendering/rendering_server_canvas.h b/servers/rendering/rendering_server_canvas.h index 7ef5480e6..083090024 100644 --- a/servers/rendering/rendering_server_canvas.h +++ b/servers/rendering/rendering_server_canvas.h @@ -248,7 +248,7 @@ public: void canvas_item_add_mesh(RID p_item, const RID &p_mesh, const Transform2D &p_transform = Transform2D(), const Color &p_modulate = Color(1, 1, 1), RID p_texture = RID(), RID p_normal_map = RID()); void canvas_item_add_multimesh(RID p_item, RID p_mesh, RID p_texture = RID(), RID p_normal_map = RID()); void canvas_item_add_texture_rect_animation(RID p_item, const Array &p_animation_data, const real_t p_start_time = 0.0); - + void canvas_item_add_set_transform(RID p_item, const Transform2D &p_transform); void canvas_item_add_clip_ignore(RID p_item, bool p_ignore); void canvas_item_set_sort_children_by_y(RID p_item, bool p_enable); diff --git a/servers/rendering/rendering_server_raster.h b/servers/rendering/rendering_server_raster.h index 338875155..1e7a58cb8 100644 --- a/servers/rendering/rendering_server_raster.h +++ b/servers/rendering/rendering_server_raster.h @@ -610,7 +610,7 @@ public: BIND6(canvas_item_add_mesh, RID, const RID &, const Transform2D &, const Color &, RID, RID) BIND4(canvas_item_add_multimesh, RID, RID, RID, RID) BIND3(canvas_item_add_texture_rect_animation, RID, const Array &, const real_t) - + BIND2(canvas_item_add_set_transform, RID, const Transform2D &) BIND2(canvas_item_add_clip_ignore, RID, bool) BIND2(canvas_item_set_sort_children_by_y, RID, bool)