Clang-format everything.

This commit is contained in:
Relintai 2024-04-21 15:27:36 +02:00
parent 3dcdcf0467
commit f09ab537e0
65 changed files with 275 additions and 284 deletions

View File

@ -1,12 +1,13 @@
/*************************************************************************/ /*************************************************************************/
/* locales.h */ /* locales.h */
/*************************************************************************/ /*************************************************************************/
/* This file is part of: */ /* This file is part of: */
/* GODOT ENGINE */ /* PANDEMONIUM ENGINE */
/* https://godotengine.org */ /* 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) 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 */ /* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */ /* a copy of this software and associated documentation files (the */

View File

@ -1951,7 +1951,7 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
int len = data.size(); int len = data.size();
PoolVector<uint8_t>::Read r = data.read(); PoolVector<uint8_t>::Read r = data.read();
const uint8_t *ptr = r.ptr(); const uint8_t *ptr = r.ptr();
if (data.size() > 0) { if (data.size() > 0) {
p_store_string_func(p_store_string_ud, "\""); p_store_string_func(p_store_string_ud, "\"");
p_store_string_func(p_store_string_ud, CryptoCore::b64_encode_str(ptr, len)); p_store_string_func(p_store_string_ud, CryptoCore::b64_encode_str(ptr, len));

View File

@ -69,7 +69,7 @@ private:
public: public:
void initialize(); void initialize();
RasterizerCanvasGLES2(); RasterizerCanvasGLES2();
protected: protected:
virtual void _update_texture_rect_animation(RasterizerCanvas::Item::CommandRectAnimation *p_item); virtual void _update_texture_rect_animation(RasterizerCanvas::Item::CommandRectAnimation *p_item);
}; };

View File

@ -699,7 +699,6 @@ public:
return bdata.vertices.request(); return bdata.vertices.request();
} }
protected: protected:
virtual void _update_texture_rect_animation(RasterizerCanvas::Item::CommandRectAnimation *p_item) {} 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) // if (a->commands.size() != 1)
// return false; // return false;
// p_a's type is already checked outside to be these // p_a's type is already checked outside to be these
//const RasterizerCanvas::Item::Command &cb = *b->commands[0]; //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)) { //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; // return false;
//} //}
const RasterizerCanvas::Item::Command &ca = *a->commands[0]; const RasterizerCanvas::Item::Command &ca = *a->commands[0];
const RasterizerCanvas::Item::Command &cb = *b->commands[0]; const RasterizerCanvas::Item::Command &cb = *b->commands[0];
if ((ca.type != cb.type)) { if ((ca.type != cb.type)) {
return false; 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) { if (ca.type == RasterizerCanvas::Item::Command::TYPE_RECT) {
const RasterizerCanvas::Item::CommandRect *rect_a = static_cast<const RasterizerCanvas::Item::CommandRect *>(&ca); const RasterizerCanvas::Item::CommandRect *rect_a = static_cast<const RasterizerCanvas::Item::CommandRect *>(&ca);
const RasterizerCanvas::Item::CommandRect *rect_b = static_cast<const RasterizerCanvas::Item::CommandRect *>(&cb); const RasterizerCanvas::Item::CommandRect *rect_b = static_cast<const RasterizerCanvas::Item::CommandRect *>(&cb);
if (rect_a->texture != rect_b->texture) { if (rect_a->texture != rect_b->texture) {
return false; return false;
} }
} else if (ca.type == RasterizerCanvas::Item::Command::TYPE_MULTIRECT) { } else if (ca.type == RasterizerCanvas::Item::Command::TYPE_MULTIRECT) {
const RasterizerCanvas::Item::CommandMultiRect *rect_a = static_cast<const RasterizerCanvas::Item::CommandMultiRect *>(&ca); const RasterizerCanvas::Item::CommandMultiRect *rect_a = static_cast<const RasterizerCanvas::Item::CommandMultiRect *>(&ca);
const RasterizerCanvas::Item::CommandMultiRect *rect_b = static_cast<const RasterizerCanvas::Item::CommandMultiRect *>(&cb); const RasterizerCanvas::Item::CommandMultiRect *rect_b = static_cast<const RasterizerCanvas::Item::CommandMultiRect *>(&cb);
if (rect_a->texture != rect_b->texture) { if (rect_a->texture != rect_b->texture) {
return false; return false;
} }
} else if (ca.type == RasterizerCanvas::Item::Command::TYPE_RECT_ANIMATION) { } else if (ca.type == RasterizerCanvas::Item::Command::TYPE_RECT_ANIMATION) {
const RasterizerCanvas::Item::CommandRectAnimation *rect_a = static_cast<const RasterizerCanvas::Item::CommandRectAnimation *>(&ca); const RasterizerCanvas::Item::CommandRectAnimation *rect_a = static_cast<const RasterizerCanvas::Item::CommandRectAnimation *>(&ca);
const RasterizerCanvas::Item::CommandRectAnimation *rect_b = static_cast<const RasterizerCanvas::Item::CommandRectAnimation *>(&cb); const RasterizerCanvas::Item::CommandRectAnimation *rect_b = static_cast<const RasterizerCanvas::Item::CommandRectAnimation *>(&cb);
if (rect_a->get_command_rect()->texture != rect_b->get_command_rect()->texture) { if (rect_a->get_command_rect()->texture != rect_b->get_command_rect()->texture) {
return false; return false;
} }

View File

@ -1,12 +1,13 @@
/*************************************************************************/ /*************************************************************************/
/* editor_locale_dialog.cpp */ /* editor_locale_dialog.cpp */
/*************************************************************************/ /*************************************************************************/
/* This file is part of: */ /* This file is part of: */
/* GODOT ENGINE */ /* PANDEMONIUM ENGINE */
/* https://godotengine.org */ /* 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) 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 */ /* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */ /* a copy of this software and associated documentation files (the */
@ -34,10 +35,10 @@
#include "editor/editor_node.h" #include "editor/editor_node.h"
#include "editor/editor_scale.h" #include "editor/editor_scale.h"
#include "scene/gui/check_button.h" #include "scene/gui/check_button.h"
#include "scene/gui/label.h"
#include "scene/gui/line_edit.h" #include "scene/gui/line_edit.h"
#include "scene/gui/option_button.h" #include "scene/gui/option_button.h"
#include "scene/gui/tree.h" #include "scene/gui/tree.h"
#include "scene/gui/label.h"
void EditorLocaleDialog::_bind_methods() { void EditorLocaleDialog::_bind_methods() {
ClassDB::bind_method(D_METHOD("_filter_mode_changed"), &EditorLocaleDialog::_filter_mode_changed); ClassDB::bind_method(D_METHOD("_filter_mode_changed"), &EditorLocaleDialog::_filter_mode_changed);

View File

@ -1,12 +1,13 @@
/*************************************************************************/ /*************************************************************************/
/* editor_locale_dialog.h */ /* editor_locale_dialog.h */
/*************************************************************************/ /*************************************************************************/
/* This file is part of: */ /* This file is part of: */
/* GODOT ENGINE */ /* PANDEMONIUM ENGINE */
/* https://godotengine.org */ /* 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) 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 */ /* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */ /* a copy of this software and associated documentation files (the */

View File

@ -57,13 +57,13 @@
#include "editor/create_dialog.h" #include "editor/create_dialog.h"
#include "editor/editor_data.h" #include "editor/editor_data.h"
#include "editor/editor_file_dialog.h" #include "editor/editor_file_dialog.h"
#include "editor/editor_locale_dialog.h"
#include "editor/editor_plugin.h" #include "editor/editor_plugin.h"
#include "editor/editor_resource_picker.h" #include "editor/editor_resource_picker.h"
#include "editor/editor_settings.h" #include "editor/editor_settings.h"
#include "editor/editor_spin_slider.h" #include "editor/editor_spin_slider.h"
#include "editor/property_selector.h" #include "editor/property_selector.h"
#include "editor/scene_tree_editor.h" #include "editor/scene_tree_editor.h"
#include "editor/editor_locale_dialog.h"
#include "editor_node.h" #include "editor_node.h"
#include "editor_properties_array_dict.h" #include "editor_properties_array_dict.h"
#include "editor_scale.h" #include "editor_scale.h"

View File

@ -56,8 +56,8 @@
#include "editor/editor_export.h" #include "editor/editor_export.h"
#include "editor/editor_file_dialog.h" #include "editor/editor_file_dialog.h"
#include "editor/editor_inspector.h" #include "editor/editor_inspector.h"
#include "editor/editor_node.h"
#include "editor/editor_locale_dialog.h" #include "editor/editor_locale_dialog.h"
#include "editor/editor_node.h"
#include "editor/editor_plugin_settings.h" #include "editor/editor_plugin_settings.h"
#include "editor/editor_scale.h" #include "editor/editor_scale.h"
#include "editor/editor_sectioned_inspector.h" #include "editor/editor_sectioned_inspector.h"

View File

@ -68,9 +68,9 @@
#include "editor/dictionary_property_edit.h" #include "editor/dictionary_property_edit.h"
#include "editor/editor_data.h" #include "editor/editor_data.h"
#include "editor/editor_file_dialog.h" #include "editor/editor_file_dialog.h"
#include "editor/editor_locale_dialog.h"
#include "editor/editor_node.h" #include "editor/editor_node.h"
#include "editor/editor_scale.h" #include "editor/editor_scale.h"
#include "editor/editor_locale_dialog.h"
#include "editor/editor_settings.h" #include "editor/editor_settings.h"
#include "editor/filesystem_dock.h" #include "editor/filesystem_dock.h"
#include "editor/property_selector.h" #include "editor/property_selector.h"

View File

@ -207,7 +207,7 @@ void EditorQuickOpen::_update_search() {
search_options->clear(); search_options->clear();
TreeItem *root = search_options->create_item(); TreeItem *root = search_options->create_item();
EditorFileSystemDirectory *efsd = EditorFileSystem::get_singleton()->get_filesystem(); EditorFileSystemDirectory *efsd = EditorFileSystem::get_singleton()->get_filesystem();
Vector<Pair<String, Ref<Texture>>> list; Vector<Pair<String, Ref<Texture>>> list;
_parse_fs(efsd, list); _parse_fs(efsd, list);

View File

@ -52,9 +52,9 @@
#include "editor/node_dock.h" #include "editor/node_dock.h"
#include "editor/plugins/animation_player_editor_plugin.h" #include "editor/plugins/animation_player_editor_plugin.h"
#include "editor/plugins/canvas_item_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/animation/animation_player.h"
#include "scene/gui/box_container.h" #include "scene/gui/box_container.h"
#include "scene/3d/lod_manager.h"
#include "scene/gui/label.h" #include "scene/gui/label.h"
#include "scene/gui/line_edit.h" #include "scene/gui/line_edit.h"
#include "scene/gui/texture_rect.h" #include "scene/gui/texture_rect.h"

View File

@ -262,7 +262,7 @@ void ESS::stat_set_main_stat_count(const int index) {
} }
// Entity Resources // 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; return _entity_resource_base_world_speed;
} }
void ESS::entity_resource_set_base_world_speed(const real_t value) { 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_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); 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"); ADD_PROPERTY(PropertyInfo(Variant::INT, "main_stat_count"), "stat_set_main_stat_count", "stat_get_main_stat_count");
// Entity Resources // 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_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); 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_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); _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); _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")); 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"));

View File

@ -114,7 +114,7 @@ public:
int stat_get_main_stat_count() const; int stat_get_main_stat_count() const;
void stat_set_main_stat_count(const int index); void stat_set_main_stat_count(const int index);
// Entity Resources // Entity Resources
real_t entity_resource_get_base_world_speed() const; real_t entity_resource_get_base_world_speed() const;
void entity_resource_set_base_world_speed(const real_t value); void entity_resource_set_base_world_speed(const real_t value);
@ -258,7 +258,7 @@ private:
String _stat_enum_string; String _stat_enum_string;
int _stat_main_stat_count; int _stat_main_stat_count;
// Entity Resources // Entity Resources
real_t _entity_resource_base_world_speed; real_t _entity_resource_base_world_speed;

View File

@ -455,7 +455,7 @@ Array CharacterSkeleton2D::bake_mesh_array_uv(Array arr, Ref<Texture> tex, float
CharacterSkeleton2D::CharacterSkeleton2D() { CharacterSkeleton2D::CharacterSkeleton2D() {
set_sort_enabled(false); set_sort_enabled(false);
_model_dirty = false; _model_dirty = false;
_model_index = 0; _model_index = 0;
_entity_type = 0; _entity_type = 0;

View File

@ -127,7 +127,7 @@ public:
uint64_t max_request_size; uint64_t max_request_size;
uint64_t request_max_file_upload_size; uint64_t request_max_file_upload_size;
WebServerSimple::FileUploadStoreType upload_file_store_type; WebServerSimple::FileUploadStoreType upload_file_store_type;
String upload_temp_file_store_path; String upload_temp_file_store_path;

View File

@ -37,8 +37,8 @@
#include "editor/editor_resource_preview.h" #include "editor/editor_resource_preview.h"
#include "editor/editor_scale.h" #include "editor/editor_scale.h"
#include "editor/editor_settings.h" #include "editor/editor_settings.h"
#include "editor/plugins/canvas_item_editor_plugin.h"
#include "editor/multi_node_edit.h" #include "editor/multi_node_edit.h"
#include "editor/plugins/canvas_item_editor_plugin.h"
#include "core/object/undo_redo.h" #include "core/object/undo_redo.h"
@ -2272,7 +2272,7 @@ void LayeredTileMapLayerEditorTilesPlugin::edit(ObjectID p_tile_map_layer_id) {
Ref<LayeredTileSet> tile_set; Ref<LayeredTileSet> tile_set;
if (edited_layer) { if (edited_layer) {
tile_set = edited_layer->get_tile_set(); tile_set = edited_layer->get_tile_set();
if (tile_set.is_valid()) { if (tile_set.is_valid()) {
//source_sort_button->set_disabled(EditorNode::get_singleton()->is_resource_read_only(tile_set)); //source_sort_button->set_disabled(EditorNode::get_singleton()->is_resource_read_only(tile_set));
source_sort_button->set_disabled(false); source_sort_button->set_disabled(false);
@ -2292,7 +2292,7 @@ void LayeredTileMapLayerEditorTilesPlugin::edit(ObjectID p_tile_map_layer_id) {
tile_map_selection.clear(); tile_map_selection.clear();
selection_pattern.instance(); selection_pattern.instance();
} }
edited_tile_map_layer_id = p_tile_map_layer_id; 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) { 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->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) && p_node->get_tree()->get_edited_scene_root()->get_parent()->is_a_parent_of(p_node) &&
Object::cast_to<LayeredTileMapLayer>(p_node)) { Object::cast_to<LayeredTileMapLayer>(p_node)) {
layers_in_scene_list_cache_needs_update = true; layers_in_scene_list_cache_needs_update = true;
} }
} }
@ -3807,10 +3806,10 @@ void LayeredTileMapLayerEditor::_notification(int p_what) {
case NOTIFICATION_READY: { case NOTIFICATION_READY: {
get_tree()->connect("node_added", this, "_node_change"); get_tree()->connect("node_added", this, "_node_change");
get_tree()->connect("node_removed", this, "_node_change"); get_tree()->connect("node_removed", this, "_node_change");
layers_in_scene_list_cache_needs_update = true; layers_in_scene_list_cache_needs_update = true;
} break; } break;
case NOTIFICATION_THEME_CHANGED: { case NOTIFICATION_THEME_CHANGED: {
missing_tile_texture = get_theme_icon("StatusWarning", "EditorIcons"); missing_tile_texture = get_theme_icon("StatusWarning", "EditorIcons");
warning_pattern_texture = get_theme_icon("WarningPattern", "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("_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("_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("_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("_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_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_next_layer_pressed"), &LayeredTileMapLayerEditor::_select_next_layer_pressed);
ClassDB::bind_method(D_METHOD("_select_all_layers_pressed"), &LayeredTileMapLayerEditor::_select_all_layers_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) { if (tile_map_layers_in_scene_cache.size() == 0) {
return; return;
} }
EditorNode *en = EditorNode::get_singleton(); EditorNode *en = EditorNode::get_singleton();
Node *edited_scene_root = en->get_edited_scene(); Node *edited_scene_root = en->get_edited_scene();
ERR_FAIL_NULL(edited_scene_root); ERR_FAIL_NULL(edited_scene_root);
@ -3984,7 +3983,7 @@ void LayeredTileMapLayerEditor::_clear_all_layers_highlighting() {
_update_tile_map_layers_in_scene_list_cache(); _update_tile_map_layers_in_scene_list_cache();
for (int i = 0; i < tile_map_layers_in_scene_cache.size(); ++i) { for (int i = 0; i < tile_map_layers_in_scene_cache.size(); ++i) {
LayeredTileMapLayer *layer = tile_map_layers_in_scene_cache[i]; LayeredTileMapLayer *layer = tile_map_layers_in_scene_cache[i];
layer->set_highlight_mode(LayeredTileMapLayer::HIGHLIGHT_MODE_DEFAULT); layer->set_highlight_mode(LayeredTileMapLayer::HIGHLIGHT_MODE_DEFAULT);
} }
} }
@ -4029,7 +4028,7 @@ void LayeredTileMapLayerEditor::_update_all_layers_highlighting() {
bool passed = false; bool passed = false;
for (int i = 0; i < tile_map_layers_in_scene_cache.size(); ++i) { for (int i = 0; i < tile_map_layers_in_scene_cache.size(); ++i) {
LayeredTileMapLayer *layer = tile_map_layers_in_scene_cache[i]; LayeredTileMapLayer *layer = tile_map_layers_in_scene_cache[i];
if (layer == edited_layer) { if (layer == edited_layer) {
passed = true; passed = true;
layer->set_highlight_mode(LayeredTileMapLayer::HIGHLIGHT_MODE_DEFAULT); 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) { void LayeredTileMapLayerEditor::_highlight_selected_layer_button_toggled(bool p_pressed) {
LayeredTileMapLayer *edited_layer = _get_edited_layer(); LayeredTileMapLayer *edited_layer = _get_edited_layer();
if (!edited_layer) { if (!edited_layer) {
return; return;
} }
EditorSettings::get_singleton()->set("editors/layered_tiles_editor/highlight_selected_layer", p_pressed); EditorSettings::get_singleton()->set("editors/layered_tiles_editor/highlight_selected_layer", p_pressed);
if (p_pressed) { if (p_pressed) {
_update_all_layers_highlighting(); _update_all_layers_highlighting();
} else { } else {
@ -4117,7 +4116,7 @@ void LayeredTileMapLayerEditor::_advanced_menu_button_id_pressed(int p_id) {
List<PropertyInfo> prop_list; List<PropertyInfo> prop_list;
tile_map->get_property_list(&prop_list); tile_map->get_property_list(&prop_list);
for (List<PropertyInfo>::Element *E = prop_list.front(); E; E = E->next()) { for (List<PropertyInfo>::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)); 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() { void LayeredTileMapLayerEditor::_update_bottom_panel() {
const LayeredTileMapLayer *edited_layer = _get_edited_layer(); const LayeredTileMapLayer *edited_layer = _get_edited_layer();
Ref<LayeredTileSet> tile_set; Ref<LayeredTileSet> tile_set;
if (edited_layer) { if (edited_layer) {
tile_set = edited_layer->get_tile_set(); tile_set = edited_layer->get_tile_set();
@ -4150,7 +4149,7 @@ void LayeredTileMapLayerEditor::_update_bottom_panel() {
} else { } else {
cant_edit_label->hide(); cant_edit_label->hide();
} }
// Update tabs visibility. // Update tabs visibility.
for (uint32_t i = 0; i < tabs_data.size(); ++i) { for (uint32_t i = 0; i < tabs_data.size(); ++i) {
LayeredTileMapLayerSubEditorPlugin::TabData &tab_data = tabs_data[i]; LayeredTileMapLayerSubEditorPlugin::TabData &tab_data = tabs_data[i];
@ -4292,7 +4291,7 @@ void LayeredTileMapLayerEditor::_layers_select_next_or_previous(bool p_next) {
} else { } else {
// Individual layer. // Individual layer.
_update_tile_map_layers_in_scene_list_cache(); _update_tile_map_layers_in_scene_list_cache();
int edited_index = -1; int edited_index = -1;
for (int i = 0; i < tile_map_layers_in_scene_cache.size(); i++) { for (int i = 0; i < tile_map_layers_in_scene_cache.size(); i++) {
if (tile_map_layers_in_scene_cache[i] == edited_layer) { 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()->clear();
en->get_editor_selection()->add_node(new_selected_layer); en->get_editor_selection()->add_node(new_selected_layer);
} else { } else {
edit(new_selected_layer); 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) { if (p_edited && p_edited->get_instance_id() == edited_tile_map_layer_id) {
return; return;
} }
_clear_all_layers_highlighting(); _clear_all_layers_highlighting();
// Disconnect to changes. // Disconnect to changes.
@ -4568,7 +4566,7 @@ void LayeredTileMapLayerEditor::edit(Object *p_edited) {
// Call the plugins and update everything. // Call the plugins and update everything.
tabs_plugins[tabs_bar->get_current_tab()]->edit(edited_tile_map_layer_id); tabs_plugins[tabs_bar->get_current_tab()]->edit(edited_tile_map_layer_id);
_update_layers_selector(); _update_layers_selector();
_update_all_layers_highlighting(); _update_all_layers_highlighting();
@ -4631,7 +4629,7 @@ LayeredTileMapLayerEditor::LayeredTileMapLayerEditor() {
// Layer selector. // Layer selector.
layer_selection_hbox = memnew(HBoxContainer); layer_selection_hbox = memnew(HBoxContainer);
tile_map_toolbar->add_child(layer_selection_hbox); tile_map_toolbar->add_child(layer_selection_hbox);
layers_selection_button = memnew(OptionButton); layers_selection_button = memnew(OptionButton);
layers_selection_button->set_custom_minimum_size(Size2(200, 0)); layers_selection_button->set_custom_minimum_size(Size2(200, 0));
layers_selection_button->set_tooltip(TTR("LayeredTileMap Layers")); layers_selection_button->set_tooltip(TTR("LayeredTileMap Layers"));

View File

@ -369,7 +369,7 @@ private:
// Toolbar. // Toolbar.
HFlowContainer *tile_map_toolbar = nullptr; HFlowContainer *tile_map_toolbar = nullptr;
bool show_layers_selector = false; bool show_layers_selector = false;
HBoxContainer *layer_selection_hbox = nullptr; HBoxContainer *layer_selection_hbox = nullptr;
@ -390,7 +390,7 @@ private:
Button *toggle_grid_button = nullptr; Button *toggle_grid_button = nullptr;
void _on_grid_toggled(bool p_pressed); void _on_grid_toggled(bool p_pressed);
enum { enum {
ADVANCED_MENU_REPLACE_WITH_PROXIES, ADVANCED_MENU_REPLACE_WITH_PROXIES,
ADVANCED_MENU_EXTRACT_TILE_MAP_LAYERS, ADVANCED_MENU_EXTRACT_TILE_MAP_LAYERS,

View File

@ -1024,7 +1024,7 @@ void LayeredTileSourceInspectorPlugin::_show_id_edit_dialog(Object *p_for_source
} }
edited_source = p_for_source; edited_source = p_for_source;
id_input->set_value(p_for_source->get("id")); id_input->set_value(p_for_source->get("id"));
//id_edit_dialog->popup_centered(Vector2i(400, 0) * EDSCALE); //id_edit_dialog->popup_centered(Vector2i(400, 0) * EDSCALE);
id_edit_dialog->popup_centered(); id_edit_dialog->popup_centered();

View File

@ -135,7 +135,7 @@ private:
void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from); 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; 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 _tile_proxy_object_changed(const String &p_what);
void _scene_tiles_list_item_selected(int p_index); void _scene_tiles_list_item_selected(int p_index);

View File

@ -41,6 +41,7 @@
#include "editor/editor_node.h" #include "editor/editor_node.h"
#include "editor/editor_scale.h" #include "editor/editor_scale.h"
#include "editor/editor_settings.h" #include "editor/editor_settings.h"
#include "editor/multi_node_edit.h"
#include "editor/plugins/canvas_item_editor_plugin.h" #include "editor/plugins/canvas_item_editor_plugin.h"
#include "scene/gui/box_container.h" #include "scene/gui/box_container.h"
#include "scene/gui/button.h" #include "scene/gui/button.h"
@ -49,7 +50,6 @@
#include "scene/main/control.h" #include "scene/main/control.h"
#include "scene/main/viewport.h" #include "scene/main/viewport.h"
#include "scene/resources/texture.h" #include "scene/resources/texture.h"
#include "editor/multi_node_edit.h"
LayeredTilesEditorUtils *LayeredTilesEditorUtils::singleton = nullptr; LayeredTilesEditorUtils *LayeredTilesEditorUtils::singleton = nullptr;
LayeredTileMapEditorPlugin *tile_map_plugin_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); ERR_FAIL_NULL(edited_layer);
Node *parent = edited_layer->get_parent(); Node *parent = edited_layer->get_parent();
if (parent) { if (parent) {
LayeredTileMapLayer *new_layer = Object::cast_to<LayeredTileMapLayer>(parent->get_node_or_null(String(p_name))); LayeredTileMapLayer *new_layer = Object::cast_to<LayeredTileMapLayer>(parent->get_node_or_null(String(p_name)));
edit(new_layer); edit(new_layer);
@ -387,7 +387,7 @@ void LayeredTileMapEditorPlugin::_edit_tile_map_layer(LayeredTileMapLayer *p_til
ERR_FAIL_NULL(p_tile_map_layer); ERR_FAIL_NULL(p_tile_map_layer);
editor->edit(p_tile_map_layer); editor->edit(p_tile_map_layer);
editor->set_show_layer_selector(p_show_layer_selector); editor->set_show_layer_selector(p_show_layer_selector);
// Update the object IDs. // Update the object IDs.
@ -445,12 +445,12 @@ void LayeredTileMapEditorPlugin::edit(Object *p_object) {
LayeredTileMap *tile_map = Object::cast_to<LayeredTileMap>(p_object); LayeredTileMap *tile_map = Object::cast_to<LayeredTileMap>(p_object);
LayeredTileMapLayer *tile_map_layer = Object::cast_to<LayeredTileMapLayer>(p_object); LayeredTileMapLayer *tile_map_layer = Object::cast_to<LayeredTileMapLayer>(p_object);
MultiNodeEdit *multi_node_edit = Object::cast_to<MultiNodeEdit>(p_object); MultiNodeEdit *multi_node_edit = Object::cast_to<MultiNodeEdit>(p_object);
if (tile_map) { if (tile_map) {
_edit_tile_map(tile_map); _edit_tile_map(tile_map);
} else if (tile_map_layer) { } 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) { } else if (multi_node_edit) {
editor->edit(multi_node_edit); editor->edit(multi_node_edit);
} else { } else {

View File

@ -40,7 +40,7 @@ class ThemeChangedNotifier : public Control {
protected: protected:
void _notification(int p_what); void _notification(int p_what);
static void _bind_methods(); static void _bind_methods();
public: public:
ThemeChangedNotifier(); ThemeChangedNotifier();
~ThemeChangedNotifier(); ~ThemeChangedNotifier();

View File

@ -46,7 +46,6 @@ bool LayeredTileMap2DNavigationGeometryParser2D::parses_node(Node *p_node) {
} }
void LayeredTileMap2DNavigationGeometryParser2D::parse_geometry(Node *p_node, Ref<NavigationPolygon> p_navigation_polygon, Ref<NavigationMeshSourceGeometryData2D> p_source_geometry) { void LayeredTileMap2DNavigationGeometryParser2D::parse_geometry(Node *p_node, Ref<NavigationPolygon> p_navigation_polygon, Ref<NavigationMeshSourceGeometryData2D> p_source_geometry) {
LayeredTileMap *tilemap = Object::cast_to<LayeredTileMap>(p_node); LayeredTileMap *tilemap = Object::cast_to<LayeredTileMap>(p_node);
NavigationPolygon::ParsedGeometryType parsed_geometry_type = p_navigation_polygon->get_parsed_geometry_type(); NavigationPolygon::ParsedGeometryType parsed_geometry_type = p_navigation_polygon->get_parsed_geometry_type();
uint32_t navigation_polygon_collision_mask = p_navigation_polygon->get_collision_mask(); uint32_t navigation_polygon_collision_mask = p_navigation_polygon->get_collision_mask();

View File

@ -33,9 +33,9 @@
#include "core/config/engine.h" #include "core/config/engine.h"
#include "core/core_string_names.h" #include "core/core_string_names.h"
#include "core/io/marshalls.h"
#include "layered_tile_map_layer.h" #include "layered_tile_map_layer.h"
#include "scene/main/control.h" #include "scene/main/control.h"
#include "core/io/marshalls.h"
#define TILEMAP_CALL_FOR_LAYER(layer, function, ...) \ #define TILEMAP_CALL_FOR_LAYER(layer, function, ...) \
if (layer < 0) { \ if (layer < 0) { \
@ -383,7 +383,7 @@ void LayeredTileMap::add_layer(int p_to_pos) {
move_child(new_layer, 0); move_child(new_layer, 0);
new_layer->set_name(vformat("Layer%d", p_to_pos)); new_layer->set_name(vformat("Layer%d", p_to_pos));
new_layer->set_tile_set(tile_set); new_layer->set_tile_set(tile_set);
#ifdef MODULE_VERTEX_LIGHTS_2D_ENABLED #ifdef MODULE_VERTEX_LIGHTS_2D_ENABLED
new_layer->set_use_vertex_lights(get_use_vertex_lights()); new_layer->set_use_vertex_lights(get_use_vertex_lights());
#endif #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_strength(rao_get_strength());
new_layer->rao_set_noise_params(rao_get_noise_params()); new_layer->rao_set_noise_params(rao_get_noise_params());
#endif #endif
move_child(new_layer, p_to_pos); move_child(new_layer, p_to_pos);
for (uint32_t i = 0; i < layers.size(); i++) { for (uint32_t i = 0; i < layers.size(); i++) {
layers[i]->set_as_tile_map_internal_node(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); layers.remove(p_layer);
remove_child(removed); remove_child(removed);
removed->queue_delete(); removed->queue_delete();
for (uint32_t i = 0; i < layers.size(); i++) { for (uint32_t i = 0; i < layers.size(); i++) {
layers[i]->set_as_tile_map_internal_node(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("move_layer", "layer", "to_position"), &LayeredTileMap::move_layer);
ClassDB::bind_method(D_METHOD("remove_layer", "layer"), &LayeredTileMap::remove_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("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("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("get_layer_name", "layer"), &LayeredTileMap::get_layer_name);
ClassDB::bind_method(D_METHOD("set_layer_enabled", "layer", "enabled"), &LayeredTileMap::set_layer_enabled); 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("_emit_changed"), &LayeredTileMap::_emit_changed);
ClassDB::bind_method(D_METHOD("_tile_set_changed"), &LayeredTileMap::_tile_set_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::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::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"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "collision_animatable"), "set_collision_animatable", "is_collision_animatable");

View File

@ -104,7 +104,7 @@ private:
void _tile_set_changed(); void _tile_set_changed();
void _emit_changed(); void _emit_changed();
// Kept for compatibility with TileMap. With TileMapLayers as individual nodes, the format is stored directly in the array. // 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<int> &p_data); void _set_tile_map_data_using_compatibility_format(int p_layer, LayeredTileMapDataFormat p_format, const Vector<int> &p_data);
Vector<int> _get_tile_map_data_using_compatibility_format(int p_layer) const; Vector<int> _get_tile_map_data_using_compatibility_format(int p_layer) const;
@ -205,7 +205,7 @@ public:
#ifdef MODULE_FASTNOISE_ENABLED #ifdef MODULE_FASTNOISE_ENABLED
void rao_set_use(bool p_rao); void rao_set_use(bool p_rao);
bool rao_get_use() const; bool rao_get_use() const;
void rao_set_strength(const real_t p_strength); void rao_set_strength(const real_t p_strength);
real_t rao_get_strength() const; real_t rao_get_strength() const;

View File

@ -1761,7 +1761,7 @@ void LayeredTileMapLayer::_internal_update(bool p_force_cleanup) {
// Clear the dirty cells list. // Clear the dirty cells list.
dirty.cell_list.clear(); dirty.cell_list.clear();
pending_update = false; 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("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); ClassDB::bind_method(D_METHOD("get_navigation_visibility_mode"), &LayeredTileMapLayer::get_navigation_visibility_mode);
BIND_VMETHOD(MethodInfo(Variant::BOOL, "_use_tile_data_runtime_update", BIND_VMETHOD(MethodInfo(Variant::BOOL, "_use_tile_data_runtime_update",
PropertyInfo(Variant::VECTOR2I, "coords"))); 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("_deferred_internal_update"), &LayeredTileMapLayer::_deferred_internal_update);
ClassDB::bind_method(D_METHOD("_renamed"), &LayeredTileMapLayer::_renamed); ClassDB::bind_method(D_METHOD("_renamed"), &LayeredTileMapLayer::_renamed);
ClassDB::bind_method(D_METHOD("_tile_set_changed"), &LayeredTileMapLayer::_tile_set_changed); 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::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::BOOL, "enabled"), "set_enabled", "is_enabled");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "tile_set", PROPERTY_HINT_RESOURCE_TYPE, "LayeredTileSet"), "set_tile_set", "get_tile_set"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "tile_set", PROPERTY_HINT_RESOURCE_TYPE, "LayeredTileSet"), "set_tile_set", "get_tile_set");
//VertexLights2D //VertexLights2D
#ifdef MODULE_VERTEX_LIGHTS_2D_ENABLED #ifdef MODULE_VERTEX_LIGHTS_2D_ENABLED
ClassDB::bind_method(D_METHOD("set_use_vertex_lights", "value"), &LayeredTileMapLayer::set_use_vertex_lights); 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); 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"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "rao_noise_params", PROPERTY_HINT_RESOURCE_TYPE, "FastnoiseNoiseParams"), "rao_set_noise_params", "rao_get_noise_params");
#endif #endif
ADD_GROUP("Rendering", ""); ADD_GROUP("Rendering", "");
ADD_PROPERTY(PropertyInfo(Variant::INT, "y_sort_origin"), "set_y_sort_origin", "get_y_sort_origin"); 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"); 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_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)); ADD_SIGNAL(MethodInfo(CoreStringNames::get_singleton()->changed));
//VertexLights2D //VertexLights2D
#ifdef MODULE_VERTEX_LIGHTS_2D_ENABLED #ifdef MODULE_VERTEX_LIGHTS_2D_ENABLED
ClassDB::bind_method(D_METHOD("_on_vertex_lights_map_changed"), &LayeredTileMapLayer::_on_vertex_lights_map_changed); ClassDB::bind_method(D_METHOD("_on_vertex_lights_map_changed"), &LayeredTileMapLayer::_on_vertex_lights_map_changed);
#endif #endif
ADD_PROPERTY_DEFAULT("tile_map_data_format", LayeredTileMapLayerDataFormat::LAYERED_TILE_MAP_LAYER_DATA_FORMAT_0); ADD_PROPERTY_DEFAULT("tile_map_data_format", LayeredTileMapLayerDataFormat::LAYERED_TILE_MAP_LAYER_DATA_FORMAT_0);
BIND_ENUM_CONSTANT(DEBUG_VISIBILITY_MODE_DEFAULT); BIND_ENUM_CONSTANT(DEBUG_VISIBILITY_MODE_DEFAULT);
@ -2307,7 +2306,7 @@ HashMap<Vector2i, LayeredTileSet::TerrainsPattern> LayeredTileMapLayer::terrain_
} }
LayeredTileMapCell LayeredTileMapLayer::get_cell(const Vector2i &p_coords) const { LayeredTileMapCell LayeredTileMapLayer::get_cell(const Vector2i &p_coords) const {
const HashMap<Vector2i, CellData>::Element* E = tile_map_layer_data.find(p_coords); const HashMap<Vector2i, CellData>::Element *E = tile_map_layer_data.find(p_coords);
if (!E) { if (!E) {
return LayeredTileMapCell(); return LayeredTileMapCell();
@ -2498,7 +2497,6 @@ Rect2i LayeredTileMapLayer::get_used_rect() const {
return used_rect_cache; return used_rect_cache;
} }
Ref<LayeredTileMapPattern> LayeredTileMapLayer::get_pattern(PoolVector2iArray p_coords_array) { Ref<LayeredTileMapPattern> LayeredTileMapLayer::get_pattern(PoolVector2iArray p_coords_array) {
ERR_FAIL_COND_V(!tile_set.is_valid(), nullptr); ERR_FAIL_COND_V(!tile_set.is_valid(), nullptr);

View File

@ -255,7 +255,7 @@ public:
enum DirtyFlags { enum DirtyFlags {
DIRTY_FLAGS_LAYER_ENABLED = 0, DIRTY_FLAGS_LAYER_ENABLED = 0,
DIRTY_FLAGS_LAYER_IN_TREE, DIRTY_FLAGS_LAYER_IN_TREE,
DIRTY_FLAGS_LAYER_IN_CANVAS, DIRTY_FLAGS_LAYER_IN_CANVAS,
DIRTY_FLAGS_LAYER_LOCAL_TRANSFORM, DIRTY_FLAGS_LAYER_LOCAL_TRANSFORM,
@ -289,7 +289,7 @@ public:
DIRTY_FLAGS_LAYER_GROUP_SELECTED_LAYERS, DIRTY_FLAGS_LAYER_GROUP_SELECTED_LAYERS,
DIRTY_FLAGS_LAYER_GROUP_HIGHLIGHT_SELECTED, DIRTY_FLAGS_LAYER_GROUP_HIGHLIGHT_SELECTED,
DIRTY_FLAGS_TILE_SET, DIRTY_FLAGS_TILE_SET,
DIRTY_FLAGS_MAX, DIRTY_FLAGS_MAX,
@ -298,16 +298,16 @@ public:
private: private:
// Properties. // Properties.
HashMap<Vector2i, CellData> tile_map_layer_data; HashMap<Vector2i, CellData> tile_map_layer_data;
bool enabled = true; bool enabled = true;
Ref<LayeredTileSet> tile_set; Ref<LayeredTileSet> tile_set;
HighlightMode highlight_mode = HIGHLIGHT_MODE_DEFAULT; HighlightMode highlight_mode = HIGHLIGHT_MODE_DEFAULT;
int y_sort_origin = 0; int y_sort_origin = 0;
int rendering_quadrant_size = 16; int rendering_quadrant_size = 16;
bool collision_enabled = true; bool collision_enabled = true;
bool use_kinematic_bodies = false; bool use_kinematic_bodies = false;
DebugVisibilityMode collision_visibility_mode = DEBUG_VISIBILITY_MODE_DEFAULT; DebugVisibilityMode collision_visibility_mode = DEBUG_VISIBILITY_MODE_DEFAULT;
@ -418,7 +418,7 @@ private:
void _queue_internal_update(); void _queue_internal_update();
void _deferred_internal_update(); void _deferred_internal_update();
void _internal_update(bool p_force_cleanup); void _internal_update(bool p_force_cleanup);
//VertexLights2D //VertexLights2D
#ifdef MODULE_VERTEX_LIGHTS_2D_ENABLED #ifdef MODULE_VERTEX_LIGHTS_2D_ENABLED
void _on_vertex_lights_map_changed(RID map); void _on_vertex_lights_map_changed(RID map);
@ -426,13 +426,13 @@ private:
protected: protected:
void _notification(int p_what); void _notification(int p_what);
static void _bind_methods(); static void _bind_methods();
public: public:
// LayeredTileMap node. // LayeredTileMap node.
void set_as_tile_map_internal_node(int p_index); void set_as_tile_map_internal_node(int p_index);
int get_index_in_tile_map() const { int get_index_in_tile_map() const {
return layer_index_in_tile_map_node; return layer_index_in_tile_map_node;
} }
@ -461,7 +461,7 @@ public:
void fix_invalid_tiles(); void fix_invalid_tiles();
void clear(); void clear();
int get_cell_source_id(const Vector2i &p_coords) const; int get_cell_source_id(const Vector2i &p_coords) const;
Vector2i get_cell_atlas_coords(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; int get_cell_alternative_tile(const Vector2i &p_coords) const;
@ -505,7 +505,7 @@ public:
void set_highlight_mode(HighlightMode p_highlight_mode); void set_highlight_mode(HighlightMode p_highlight_mode);
HighlightMode get_highlight_mode() const; HighlightMode get_highlight_mode() const;
virtual void set_self_modulate(const Color &p_self_modulate); virtual void set_self_modulate(const Color &p_self_modulate);
virtual void set_y_sort_enabled(bool p_y_sort_enabled); virtual void set_y_sort_enabled(bool p_y_sort_enabled);
void set_y_sort_origin(int p_y_sort_origin); void set_y_sort_origin(int p_y_sort_origin);
@ -528,7 +528,7 @@ public:
RID get_navigation_map() const; RID get_navigation_map() const;
void set_navigation_visibility_mode(DebugVisibilityMode p_show_navigation); void set_navigation_visibility_mode(DebugVisibilityMode p_show_navigation);
DebugVisibilityMode get_navigation_visibility_mode() const; DebugVisibilityMode get_navigation_visibility_mode() const;
// Virtual function to modify the LayeredTileData at runtime. // Virtual function to modify the LayeredTileData at runtime.
bool use_tile_data_runtime_update(const Vector2i &p_coords); bool use_tile_data_runtime_update(const Vector2i &p_coords);
void tile_data_runtime_update(const Vector2i &p_coords, LayeredTileData *p_tile_data); void tile_data_runtime_update(const Vector2i &p_coords, LayeredTileData *p_tile_data);
@ -543,7 +543,7 @@ public:
#ifdef MODULE_FASTNOISE_ENABLED #ifdef MODULE_FASTNOISE_ENABLED
void rao_set_use(bool p_rao); void rao_set_use(bool p_rao);
bool rao_get_use() const; bool rao_get_use() const;
void rao_set_strength(const real_t p_strength); void rao_set_strength(const real_t p_strength);
real_t rao_get_strength() const; real_t rao_get_strength() const;
@ -551,11 +551,11 @@ public:
Ref<FastnoiseNoiseParams> rao_get_noise_params(); Ref<FastnoiseNoiseParams> rao_get_noise_params();
void rao_setup_noise(Ref<FastNoise> noise); void rao_setup_noise(Ref<FastNoise> noise);
Ref<FastNoise> rao_get_noise(); Ref<FastNoise> rao_get_noise();
void rao_set_noise(const Ref<FastNoise> &noise); void rao_set_noise(const Ref<FastNoise> &noise);
#endif #endif
LayeredTileMapLayer(); LayeredTileMapLayer();
~LayeredTileMapLayer(); ~LayeredTileMapLayer();
}; };

View File

@ -1436,7 +1436,7 @@ int LayeredTileSet::get_patterns_count() {
RBSet<LayeredTileSet::TerrainsPattern> LayeredTileSet::get_terrains_pattern_set(int p_terrain_set) const { RBSet<LayeredTileSet::TerrainsPattern> LayeredTileSet::get_terrains_pattern_set(int p_terrain_set) const {
ERR_FAIL_INDEX_V(p_terrain_set, terrain_sets.size(), RBSet<LayeredTileSet::TerrainsPattern>()); ERR_FAIL_INDEX_V(p_terrain_set, terrain_sets.size(), RBSet<LayeredTileSet::TerrainsPattern>());
const_cast<LayeredTileSet*>(this)->_update_terrains_cache(); const_cast<LayeredTileSet *>(this)->_update_terrains_cache();
RBSet<LayeredTileSet::TerrainsPattern> output; RBSet<LayeredTileSet::TerrainsPattern> output;
@ -1452,15 +1452,15 @@ RBSet<LayeredTileSet::TerrainsPattern> LayeredTileSet::get_terrains_pattern_set(
RBSet<LayeredTileMapCell> LayeredTileSet::get_tiles_for_terrains_pattern(int p_terrain_set, TerrainsPattern p_terrain_tile_pattern) const { RBSet<LayeredTileMapCell> 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<LayeredTileMapCell>()); ERR_FAIL_INDEX_V(p_terrain_set, terrain_sets.size(), RBSet<LayeredTileMapCell>());
const_cast<LayeredTileSet*>(this)->_update_terrains_cache(); const_cast<LayeredTileSet *>(this)->_update_terrains_cache();
return per_terrain_pattern_tiles[p_terrain_set][p_terrain_tile_pattern]; 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 { 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()); ERR_FAIL_INDEX_V(p_terrain_set, terrain_sets.size(), LayeredTileMapCell());
const_cast<LayeredTileSet*>(this)->_update_terrains_cache(); const_cast<LayeredTileSet *>(this)->_update_terrains_cache();
// Count the sum of probabilities. // Count the sum of probabilities.
double sum = 0.0; double sum = 0.0;
@ -1509,7 +1509,6 @@ LayeredTileMapCell LayeredTileSet::get_random_tile_from_terrains_pattern(int p_t
ERR_FAIL_V(LayeredTileMapCell()); ERR_FAIL_V(LayeredTileMapCell());
} }
Vector<Vector2> LayeredTileSet::get_tile_shape_polygon() const { Vector<Vector2> LayeredTileSet::get_tile_shape_polygon() const {
Vector<Vector2> points; Vector<Vector2> points;
if (tile_shape == LayeredTileSet::TILE_SHAPE_SQUARE) { if (tile_shape == LayeredTileSet::TILE_SHAPE_SQUARE) {

View File

@ -618,7 +618,7 @@ public:
TRANSFORM_FLIP_V = 1 << 13, TRANSFORM_FLIP_V = 1 << 13,
TRANSFORM_TRANSPOSE = 1 << 14, TRANSFORM_TRANSPOSE = 1 << 14,
}; };
static const int16_t UNTRANSFORM_MASK = ~(LayeredTileSetAtlasSource::TRANSFORM_FLIP_H + LayeredTileSetAtlasSource::TRANSFORM_FLIP_V + LayeredTileSetAtlasSource::TRANSFORM_TRANSPOSE); static const int16_t UNTRANSFORM_MASK = ~(LayeredTileSetAtlasSource::TRANSFORM_FLIP_H + LayeredTileSetAtlasSource::TRANSFORM_FLIP_V + LayeredTileSetAtlasSource::TRANSFORM_TRANSPOSE);
private: private:

View File

@ -34,8 +34,8 @@
#include "geometry_parser/layered_tilemap_navigation_geometry_parser_2d.h" #include "geometry_parser/layered_tilemap_navigation_geometry_parser_2d.h"
#include "servers/navigation/navigation_mesh_generator.h" #include "servers/navigation/navigation_mesh_generator.h"
#include "layered_tile_map_layer.h"
#include "layered_tile_map.h" #include "layered_tile_map.h"
#include "layered_tile_map_layer.h"
#include "layered_tile_set.h" #include "layered_tile_set.h"
#ifdef TOOLS_ENABLED #ifdef TOOLS_ENABLED

View File

@ -195,7 +195,7 @@ void MMNode::register_input_property(const Ref<MMNodeUniversalProperty> &p_prop)
if (!prop->is_connected("changed", this, "on_input_property_changed")) { if (!prop->is_connected("changed", this, "on_input_property_changed")) {
prop->connect("changed", this, "on_input_property_changed"); prop->connect("changed", this, "on_input_property_changed");
} }
input_properties.erase(prop); input_properties.erase(prop);
input_properties.push_back(prop); input_properties.push_back(prop);
} }
@ -218,7 +218,7 @@ void MMNode::register_output_property(const Ref<MMNodeUniversalProperty> &p_prop
Ref<MMNodeUniversalProperty> prop = p_prop; Ref<MMNodeUniversalProperty> prop = p_prop;
prop->set_owner(this); prop->set_owner(this);
output_properties.erase(prop); output_properties.erase(prop);
output_properties.push_back(prop); output_properties.push_back(prop);
} }

View File

@ -52,7 +52,7 @@ String MMImage::get_image_path() {
void MMImage::set_image_path(const String &val) { void MMImage::set_image_path(const String &val) {
image_path = val; image_path = val;
Ref<Image> img; Ref<Image> img;
if (image_path != "") { if (image_path != "") {
img.instance(); img.instance();
ImageLoader::load_image(image_path, img); ImageLoader::load_image(image_path, img);

View File

@ -1,5 +1,5 @@
/*************************************************************************/ /*************************************************************************/
/* prop.cpp */ /* prop_light.cpp */
/*************************************************************************/ /*************************************************************************/
/* This file is part of: */ /* This file is part of: */
/* PANDEMONIUM ENGINE */ /* PANDEMONIUM ENGINE */

View File

@ -56,13 +56,13 @@ public:
bool get_is_merger(); bool get_is_merger();
void set_is_merger(bool value); void set_is_merger(bool value);
PropMergeGroup(); PropMergeGroup();
~PropMergeGroup(); ~PropMergeGroup();
protected: protected:
static void _bind_methods(); static void _bind_methods();
bool _is_merger; bool _is_merger;
Vector<Ref<Material>> _materials; Vector<Ref<Material>> _materials;
}; };

View File

@ -1218,7 +1218,7 @@ void SkeletonEditor::copy_pose() {
if (!skeleton) { if (!skeleton) {
return; return;
} }
_pose_clipboard.clear(); _pose_clipboard.clear();
for (int i = 0; i < skeleton->get_bone_count(); ++i) { for (int i = 0; i < skeleton->get_bone_count(); ++i) {
@ -1230,9 +1230,9 @@ void SkeletonEditor::paste_pose() {
if (!skeleton) { if (!skeleton) {
return; return;
} }
ERR_FAIL_COND(skeleton->get_bone_count() != _pose_clipboard.size()); ERR_FAIL_COND(skeleton->get_bone_count() != _pose_clipboard.size());
for (int i = 0; i < skeleton->get_bone_count(); ++i) { for (int i = 0; i < skeleton->get_bone_count(); ++i) {
skeleton->set_bone_pose(i, _pose_clipboard[i]); skeleton->set_bone_pose(i, _pose_clipboard[i]);
} }

View File

@ -247,10 +247,10 @@ public:
void _add_bone_callback(); void _add_bone_callback();
void _remove_bone_callback(); void _remove_bone_callback();
void _rename_bone_callback(); void _rename_bone_callback();
void copy_pose(); void copy_pose();
void paste_pose(); void paste_pose();
Vector<Transform> _pose_clipboard; Vector<Transform> _pose_clipboard;
void create_bone_tool_popups(); void create_bone_tool_popups();

View File

@ -364,7 +364,7 @@ void Skeleton::_notification(int p_what) {
if (modification_stack.is_valid()) { if (modification_stack.is_valid()) {
execute_modifications(get_process_delta_time(), SkeletonModificationStack3D::EXECUTION_MODE::execution_mode_process); execute_modifications(get_process_delta_time(), SkeletonModificationStack3D::EXECUTION_MODE::execution_mode_process);
} }
if (dirty) { if (dirty) {
_notification(NOTIFICATION_UPDATE_SKELETON); _notification(NOTIFICATION_UPDATE_SKELETON);
} }

View File

@ -133,7 +133,7 @@ void VertexLight2D::_notification(int p_what) {
ERR_FAIL_COND(!world.is_valid()); ERR_FAIL_COND(!world.is_valid());
RID map = world->get_vertex_lights_2d_map(); RID map = world->get_vertex_lights_2d_map();
VertexLights2DServer::get_singleton()->light_set_map(_vertex_light, map); VertexLights2DServer::get_singleton()->light_set_map(_vertex_light, map);
VertexLights2DServer::get_singleton()->light_set_position(_vertex_light, get_global_transform().get_origin()); VertexLights2DServer::get_singleton()->light_set_position(_vertex_light, get_global_transform().get_origin());
_update_light_visibility(); _update_light_visibility();

View File

@ -2,7 +2,7 @@
#define VERTEX_LIGHT_2D_H #define VERTEX_LIGHT_2D_H
/*************************************************************************/ /*************************************************************************/
/* vertex_2d.h */ /* vertex_light_2d.h */
/*************************************************************************/ /*************************************************************************/
/* This file is part of: */ /* This file is part of: */
/* PANDEMONIUM ENGINE */ /* PANDEMONIUM ENGINE */

View File

@ -1,5 +1,5 @@
/*************************************************************************/ /*************************************************************************/
/* vertex_light_2d.cpp */ /* vertex_light_2d_environment.cpp */
/*************************************************************************/ /*************************************************************************/
/* This file is part of: */ /* This file is part of: */
/* PANDEMONIUM ENGINE */ /* PANDEMONIUM ENGINE */

View File

@ -2,7 +2,7 @@
#define VERTEX_LIGHT_2D_ENVIRONMENT_H #define VERTEX_LIGHT_2D_ENVIRONMENT_H
/*************************************************************************/ /*************************************************************************/
/* vertex_2d.h */ /* vertex_light_2d_environment.h */
/*************************************************************************/ /*************************************************************************/
/* This file is part of: */ /* This file is part of: */
/* PANDEMONIUM ENGINE */ /* PANDEMONIUM ENGINE */

View File

@ -44,7 +44,7 @@ Color VertexLights2DServer::VertexLightQuadrant2D::sample_light(const Color &p_c
for (uint32_t i = 0; i < lights.size(); ++i) { for (uint32_t i = 0; i < lights.size(); ++i) {
VertexLightData2D *l = lights[i]; VertexLightData2D *l = lights[i];
if (!l->enabled) { if (!l->enabled) {
continue; 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) { if (p_layer < l->layer_range.x || p_layer > l->layer_range.y) {
continue; continue;
} }
if (p_z_index < l->z_range.x || p_z_index > l->z_range.y) { if (p_z_index < l->z_range.x || p_z_index > l->z_range.y) {
continue; continue;
} }
Vector2 light_to_pos = p_position - l->position; Vector2 light_to_pos = p_position - l->position;
Vector2 light_to_pos_normal_space = light_to_pos; Vector2 light_to_pos_normal_space = light_to_pos;
light_to_pos_normal_space.x /= static_cast<real_t>(l->range.x); light_to_pos_normal_space.x /= static_cast<real_t>(l->range.x);
light_to_pos_normal_space.y /= static_cast<real_t>(l->range.y); light_to_pos_normal_space.y /= static_cast<real_t>(l->range.y);
@ -77,7 +77,7 @@ Color VertexLights2DServer::VertexLightQuadrant2D::sample_light(const Color &p_c
if (ltpnsl >= 1) { if (ltpnsl >= 1) {
continue; continue;
} }
real_t attenuation = pow(1.0 - ltpnsl, l->attenuation); real_t attenuation = pow(1.0 - ltpnsl, l->attenuation);
Color ac = l->color * attenuation; Color ac = l->color * attenuation;
@ -93,10 +93,10 @@ Color VertexLights2DServer::VertexLightQuadrant2D::sample_light(const Color &p_c
c = c.blend(ac); c = c.blend(ac);
} break; } break;
} }
c = c.clamp(); c = c.clamp();
} }
return c; return c;
} }
@ -191,14 +191,14 @@ Color VertexLights2DServer::VertexLightMap2D::sample_light(const Vector2 &p_posi
Color c = base_color; Color c = base_color;
Vector2i quadrant_position = to_quadrant_position(p_position); Vector2i quadrant_position = to_quadrant_position(p_position);
for (int x = quadrant_position.x - 1; x <= quadrant_position.x + 1; ++x) { 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) { for (int y = quadrant_position.y - 1; y <= quadrant_position.y + 1; ++y) {
Vector2i qp = Vector2i(x, y); Vector2i qp = Vector2i(x, y);
if (quadrants.has(qp)) { if (quadrants.has(qp)) {
VertexLightQuadrant2D *q = quadrants[qp]; VertexLightQuadrant2D *q = quadrants[qp];
c = q->sample_light(c, p_position, p_item_cull_mask, p_layer, p_z_index); c = q->sample_light(c, p_position, p_item_cull_mask, p_layer, p_z_index);
} }
} }

View File

@ -1,5 +1,5 @@
/*************************************************************************/ /*************************************************************************/
/* vertex_lights_2d.cpp */ /* vertex_lights_2d_server.cpp */
/*************************************************************************/ /*************************************************************************/
/* This file is part of: */ /* This file is part of: */
/* PANDEMONIUM ENGINE */ /* PANDEMONIUM ENGINE */

View File

@ -2,7 +2,7 @@
#define VERTEX_LIGHT_2D_SERVER_H #define VERTEX_LIGHT_2D_SERVER_H
/*************************************************************************/ /*************************************************************************/
/* vertex_lights_2d.h */ /* vertex_lights_2d_server.h */
/*************************************************************************/ /*************************************************************************/
/* This file is part of: */ /* This file is part of: */
/* PANDEMONIUM ENGINE */ /* PANDEMONIUM ENGINE */
@ -64,7 +64,7 @@ public:
Vector2i map_get_quadrant_size(RID p_map) const; Vector2i map_get_quadrant_size(RID p_map) const;
void map_set_quadrant_size(RID p_map, const Vector2i &p_size); void map_set_quadrant_size(RID p_map, const Vector2i &p_size);
Color map_get_base_color(RID p_map) const; Color map_get_base_color(RID p_map) const;
void map_set_base_color(RID p_map, const Color &p_base_color); void map_set_base_color(RID p_map, const Color &p_base_color);
@ -113,7 +113,7 @@ public:
// Rest // Rest
void free(RID p_rid); void free(RID p_rid);
void init(); void init();
void flush_notifications(); void flush_notifications();
@ -219,7 +219,7 @@ protected:
_changed_maps.insert(p_light->map->self); _changed_maps.insert(p_light->map->self);
} }
} }
_FORCE_INLINE_ void _light_enabled_changed(const VertexLightData2D *p_light) const { _FORCE_INLINE_ void _light_enabled_changed(const VertexLightData2D *p_light) const {
if (p_light && p_light->map) { if (p_light && p_light->map) {
_changed_maps.insert(p_light->map->self); _changed_maps.insert(p_light->map->self);

View File

@ -113,7 +113,7 @@ void VertexLight3D::_notification(int p_what) {
ERR_FAIL_COND(!world.is_valid()); ERR_FAIL_COND(!world.is_valid());
RID map = world->get_vertex_lights_3d_map(); RID map = world->get_vertex_lights_3d_map();
VertexLights3DServer::get_singleton()->light_set_map(_vertex_light, map); VertexLights3DServer::get_singleton()->light_set_map(_vertex_light, map);
VertexLights3DServer::get_singleton()->light_set_position(_vertex_light, get_global_transform().get_origin()); VertexLights3DServer::get_singleton()->light_set_position(_vertex_light, get_global_transform().get_origin());
_update_light_visibility(); _update_light_visibility();

View File

@ -2,7 +2,7 @@
#define VERTEX_LIGHT_3D_H #define VERTEX_LIGHT_3D_H
/*************************************************************************/ /*************************************************************************/
/* vertex_3d.h */ /* vertex_light_3d.h */
/*************************************************************************/ /*************************************************************************/
/* This file is part of: */ /* This file is part of: */
/* PANDEMONIUM ENGINE */ /* PANDEMONIUM ENGINE */

View File

@ -1,5 +1,5 @@
/*************************************************************************/ /*************************************************************************/
/* vertex_light_3d.cpp */ /* vertex_light_3d_environment.cpp */
/*************************************************************************/ /*************************************************************************/
/* This file is part of: */ /* This file is part of: */
/* PANDEMONIUM ENGINE */ /* PANDEMONIUM ENGINE */

View File

@ -2,7 +2,7 @@
#define VERTEX_LIGHT_3D_ENVIRONMENT_H #define VERTEX_LIGHT_3D_ENVIRONMENT_H
/*************************************************************************/ /*************************************************************************/
/* vertex_3d.h */ /* vertex_light_3d_environment.h */
/*************************************************************************/ /*************************************************************************/
/* This file is part of: */ /* This file is part of: */
/* PANDEMONIUM ENGINE */ /* PANDEMONIUM ENGINE */

View File

@ -57,7 +57,6 @@ Color VertexLights3DServer::VertexLightQuadrant3D::sample_light_value(const Colo
continue; continue;
} }
Vector3 light_to_pos = p_position - l->position; Vector3 light_to_pos = p_position - l->position;
Vector3 light_to_pos_normal_space = light_to_pos; Vector3 light_to_pos_normal_space = light_to_pos;

View File

@ -1,5 +1,5 @@
/*************************************************************************/ /*************************************************************************/
/* vertex_lights_3d.cpp */ /* vertex_lights_3d_server.cpp */
/*************************************************************************/ /*************************************************************************/
/* This file is part of: */ /* This file is part of: */
/* PANDEMONIUM ENGINE */ /* PANDEMONIUM ENGINE */

View File

@ -2,7 +2,7 @@
#define VERTEX_LIGHT_3D_SERVER_H #define VERTEX_LIGHT_3D_SERVER_H
/*************************************************************************/ /*************************************************************************/
/* vertex_lights_3d.h */ /* vertex_lights_3d_server.h */
/*************************************************************************/ /*************************************************************************/
/* This file is part of: */ /* This file is part of: */
/* PANDEMONIUM ENGINE */ /* PANDEMONIUM ENGINE */
@ -64,7 +64,7 @@ public:
Vector3i map_get_octant_size(RID p_map) const; Vector3i map_get_octant_size(RID p_map) const;
void map_set_octant_size(RID p_map, const Vector3i &p_size); void map_set_octant_size(RID p_map, const Vector3i &p_size);
Color map_get_base_color(RID p_map) const; Color map_get_base_color(RID p_map) const;
void map_set_base_color(RID p_map, const Color &p_base_color); void map_set_base_color(RID p_map, const Color &p_base_color);
@ -108,7 +108,7 @@ public:
// Rest // Rest
void free(RID p_rid); void free(RID p_rid);
void init(); void init();
void flush_notifications(); void flush_notifications();
@ -212,7 +212,7 @@ protected:
_changed_maps.insert(p_light->map->self); _changed_maps.insert(p_light->map->self);
} }
} }
_FORCE_INLINE_ void _light_enabled_changed(const VertexLightData3D *p_light) const { _FORCE_INLINE_ void _light_enabled_changed(const VertexLightData3D *p_light) const {
if (p_light && p_light->map) { if (p_light && p_light->map) {
_changed_maps.insert(p_light->map->self); _changed_maps.insert(p_light->map->self);

View File

@ -57,7 +57,7 @@ public:
//e.g. http://127.0.0.1/a/b/d.jpg -> /a/b/d.jpg //e.g. http://127.0.0.1/a/b/d.jpg -> /a/b/d.jpg
bool wwwroot_has_file(const String &file_path); bool wwwroot_has_file(const String &file_path);
String wwwroot_get_file_abspath(const String &file_path); String wwwroot_get_file_abspath(const String &file_path);
String wwwroot_get_simplified_abs_path(const String &file_path); String wwwroot_get_simplified_abs_path(const String &file_path);
bool get_cached_body(const String &path, String *body); bool get_cached_body(const String &path, String *body);

View File

@ -501,7 +501,7 @@ public class PandemoniumInputHandler implements InputManager.InputDeviceListener
verticalFactor = event.getAxisValue(MotionEvent.AXIS_VSCROLL); verticalFactor = event.getAxisValue(MotionEvent.AXIS_VSCROLL);
horizontalFactor = event.getAxisValue(MotionEvent.AXIS_HSCROLL); horizontalFactor = event.getAxisValue(MotionEvent.AXIS_HSCROLL);
} }
boolean sourceMouseRelative = false; boolean sourceMouseRelative = false;
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) { if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
sourceMouseRelative = event.isFromSource(InputDevice.SOURCE_MOUSE_RELATIVE); sourceMouseRelative = event.isFromSource(InputDevice.SOURCE_MOUSE_RELATIVE);

View File

@ -36,7 +36,6 @@
#include "platform/frt/logo.gen.h" #include "platform/frt/logo.gen.h"
#include "scene/resources/texture.h" #include "scene/resources/texture.h"
class EditorExportPlatformFRT : public EditorExportPlatform { class EditorExportPlatformFRT : public EditorExportPlatform {
GDCLASS(EditorExportPlatformFRT, EditorExportPlatform); GDCLASS(EditorExportPlatformFRT, EditorExportPlatform);
@ -103,7 +102,6 @@ public:
EditorExportPlatformFRT(); EditorExportPlatformFRT();
}; };
////////// //////////
void EditorExportPlatformFRT::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) { void EditorExportPlatformFRT::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) {
@ -338,8 +336,8 @@ String EditorExportPlatformFRT::get_preset_arch(const Ref<EditorExportPreset> &p
if (arch != "arm32v6" && arch != "arm32v7" && arch != "arm64v8") { if (arch != "arm32v6" && arch != "arm32v7" && arch != "arm64v8") {
ERR_PRINT(vformat("Invalid value \"%s\" for \"binary_format/architecture\" in export preset \"%s\". Defaulting to \"arm32v6\".", ERR_PRINT(vformat("Invalid value \"%s\" for \"binary_format/architecture\" in export preset \"%s\". Defaulting to \"arm32v6\".",
arch, arch,
p_preset->get_name())); p_preset->get_name()));
arch = "arm32v6"; arch = "arm32v6";
} }
@ -352,9 +350,9 @@ void EditorExportPlatformFRT::add_platform_feature(const String &p_feature) {
} }
void EditorExportPlatformFRT::get_platform_features(List<String> *r_features) { void EditorExportPlatformFRT::get_platform_features(List<String> *r_features) {
r_features->push_back("pc"); //all pcs support "pc" r_features->push_back("pc"); // all pcs support "pc"
r_features->push_back("s3tc"); //all pcs support "s3tc" compression 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(get_os_name()); // OS name is a feature
for (RBSet<String>::Element *E = extra_features.front(); E; E = E->next()) { for (RBSet<String>::Element *E = extra_features.front(); E; E = E->next()) {
r_features->push_back(E->get()); r_features->push_back(E->get());

View File

@ -1,5 +1,5 @@
/*************************************************************************/ /*************************************************************************/
/* pandemonium_frt.cpp */ /* pandemonium_frt.cpp */
/*************************************************************************/ /*************************************************************************/
/* This file is part of: */ /* This file is part of: */
/* PANDEMONIUM ENGINE */ /* PANDEMONIUM ENGINE */

View File

@ -36,7 +36,6 @@
#include "platform/frt_sdl/logo.gen.h" #include "platform/frt_sdl/logo.gen.h"
#include "scene/resources/texture.h" #include "scene/resources/texture.h"
class EditorExportPlatformFRTSDL : public EditorExportPlatform { class EditorExportPlatformFRTSDL : public EditorExportPlatform {
GDCLASS(EditorExportPlatformFRTSDL, EditorExportPlatform); GDCLASS(EditorExportPlatformFRTSDL, EditorExportPlatform);
@ -103,7 +102,6 @@ public:
EditorExportPlatformFRTSDL(); EditorExportPlatformFRTSDL();
}; };
////////// //////////
void EditorExportPlatformFRTSDL::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) { void EditorExportPlatformFRTSDL::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) {
@ -338,7 +336,7 @@ String EditorExportPlatformFRTSDL::get_preset_arch(const Ref<EditorExportPreset>
if (arch != "arm32v6" && arch != "arm32v7" && arch != "arm64v8") { if (arch != "arm32v6" && arch != "arm32v7" && arch != "arm64v8") {
ERR_PRINT(vformat("Invalid value \"%s\" for \"binary_format/architecture\" in export preset \"%s\". Defaulting to \"arm32v6\".", ERR_PRINT(vformat("Invalid value \"%s\" for \"binary_format/architecture\" in export preset \"%s\". Defaulting to \"arm32v6\".",
arch, arch,
p_preset->get_name())); p_preset->get_name()));
arch = "arm32v6"; arch = "arm32v6";

View File

@ -1,32 +1,33 @@
/**************************************************************************/ /*************************************************************************/
/* lod.cpp */ /* lod.cpp */
/**************************************************************************/ /*************************************************************************/
/* This file is part of: */ /* This file is part of: */
/* GODOT ENGINE */ /* PANDEMONIUM ENGINE */
/* https://godotengine.org */ /* https://github.com/Relintai/pandemonium_engine */
/**************************************************************************/ /*************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */ /* Copyright (c) 2022-present Péter Magyar. */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ /* 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 */ /* Permission is hereby granted, free of charge, to any person obtaining */
/* "Software"), to deal in the Software without restriction, including */ /* a copy of this software and associated documentation files (the */
/* without limitation the rights to use, copy, modify, merge, publish, */ /* "Software"), to deal in the Software without restriction, including */
/* distribute, sublicense, and/or sell copies of the Software, and to */ /* without limitation the rights to use, copy, modify, merge, publish, */
/* permit persons to whom the Software is furnished to do so, subject to */ /* distribute, sublicense, and/or sell copies of the Software, and to */
/* the following conditions: */ /* 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 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 */ /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */ /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ /* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* 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" #include "lod.h"

View File

@ -1,32 +1,33 @@
/**************************************************************************/ /*************************************************************************/
/* lod.h */ /* lod.h */
/**************************************************************************/ /*************************************************************************/
/* This file is part of: */ /* This file is part of: */
/* GODOT ENGINE */ /* PANDEMONIUM ENGINE */
/* https://godotengine.org */ /* https://github.com/Relintai/pandemonium_engine */
/**************************************************************************/ /*************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */ /* Copyright (c) 2022-present Péter Magyar. */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ /* 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 */ /* Permission is hereby granted, free of charge, to any person obtaining */
/* "Software"), to deal in the Software without restriction, including */ /* a copy of this software and associated documentation files (the */
/* without limitation the rights to use, copy, modify, merge, publish, */ /* "Software"), to deal in the Software without restriction, including */
/* distribute, sublicense, and/or sell copies of the Software, and to */ /* without limitation the rights to use, copy, modify, merge, publish, */
/* permit persons to whom the Software is furnished to do so, subject to */ /* distribute, sublicense, and/or sell copies of the Software, and to */
/* the following conditions: */ /* 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 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 */ /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */ /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ /* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* 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 #ifndef LOD_H
#define LOD_H #define LOD_H

View File

@ -1,32 +1,33 @@
/**************************************************************************/ /*************************************************************************/
/* lod_manager.cpp */ /* lod_manager.cpp */
/**************************************************************************/ /*************************************************************************/
/* This file is part of: */ /* This file is part of: */
/* GODOT ENGINE */ /* PANDEMONIUM ENGINE */
/* https://godotengine.org */ /* https://github.com/Relintai/pandemonium_engine */
/**************************************************************************/ /*************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */ /* Copyright (c) 2022-present Péter Magyar. */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ /* 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 */ /* Permission is hereby granted, free of charge, to any person obtaining */
/* "Software"), to deal in the Software without restriction, including */ /* a copy of this software and associated documentation files (the */
/* without limitation the rights to use, copy, modify, merge, publish, */ /* "Software"), to deal in the Software without restriction, including */
/* distribute, sublicense, and/or sell copies of the Software, and to */ /* without limitation the rights to use, copy, modify, merge, publish, */
/* permit persons to whom the Software is furnished to do so, subject to */ /* distribute, sublicense, and/or sell copies of the Software, and to */
/* the following conditions: */ /* 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 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 */ /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */ /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ /* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* 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" #include "lod_manager.h"

View File

@ -1,32 +1,33 @@
/**************************************************************************/ /*************************************************************************/
/* lod_manager.h */ /* lod_manager.h */
/**************************************************************************/ /*************************************************************************/
/* This file is part of: */ /* This file is part of: */
/* GODOT ENGINE */ /* PANDEMONIUM ENGINE */
/* https://godotengine.org */ /* https://github.com/Relintai/pandemonium_engine */
/**************************************************************************/ /*************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */ /* Copyright (c) 2022-present Péter Magyar. */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ /* 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 */ /* Permission is hereby granted, free of charge, to any person obtaining */
/* "Software"), to deal in the Software without restriction, including */ /* a copy of this software and associated documentation files (the */
/* without limitation the rights to use, copy, modify, merge, publish, */ /* "Software"), to deal in the Software without restriction, including */
/* distribute, sublicense, and/or sell copies of the Software, and to */ /* without limitation the rights to use, copy, modify, merge, publish, */
/* permit persons to whom the Software is furnished to do so, subject to */ /* distribute, sublicense, and/or sell copies of the Software, and to */
/* the following conditions: */ /* 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 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 */ /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */ /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ /* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* 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 #ifndef LOD_MANAGER_H
#define LOD_MANAGER_H #define LOD_MANAGER_H

View File

@ -605,7 +605,6 @@ void SpatialMaterial::_update_shader() {
} }
code += "\tALBEDO = albedo.rgb * albedo_tex.rgb;\n"; code += "\tALBEDO = albedo.rgb * albedo_tex.rgb;\n";
if (orm) { if (orm) {
if (textures[TEXTURE_ORM] != nullptr) { if (textures[TEXTURE_ORM] != nullptr) {
if (flags[FLAG_UV1_USE_TRIPLANAR]) { if (flags[FLAG_UV1_USE_TRIPLANAR]) {

View File

@ -364,8 +364,6 @@ void World3D::notify_saving(bool p_active) {
} }
void World3D::_bind_methods() { void World3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_space"), &World3D::get_space); 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_scenario"), &World3D::get_scenario);
ClassDB::bind_method(D_METHOD("get_navigation_map"), &World3D::get_navigation_map); ClassDB::bind_method(D_METHOD("get_navigation_map"), &World3D::get_navigation_map);

View File

@ -83,7 +83,7 @@ public:
RID get_space() const; RID get_space() const;
RID get_scenario() const; RID get_scenario() const;
RID get_navigation_map() const; RID get_navigation_map() const;
// TODO Maybe World should have a callback on creation? // TODO Maybe World should have a callback on creation?
RID get_vertex_lights_3d_map(); RID get_vertex_lights_3d_map();

View File

@ -874,7 +874,7 @@ public:
void update(real_t p_delta) { void update(real_t p_delta) {
time_elapsed += p_delta; time_elapsed += p_delta;
while (time_elapsed >= total_time) { while (time_elapsed >= total_time) {
time_elapsed -= total_time; time_elapsed -= total_time;
} }
@ -896,12 +896,12 @@ public:
total_time = 0; total_time = 0;
type = TYPE_RECT_ANIMATION; type = TYPE_RECT_ANIMATION;
} }
virtual ~CommandRectAnimation() { virtual ~CommandRectAnimation() {
for (int i = 0; i < rects.size(); ++i) { for (int i = 0; i < rects.size(); ++i) {
memdelete(rects[i]); memdelete(rects[i]);
} }
rects.clear(); rects.clear();
times.clear(); times.clear();
} }

View File

@ -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_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_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_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_set_transform(RID p_item, const Transform2D &p_transform);
void canvas_item_add_clip_ignore(RID p_item, bool p_ignore); 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); void canvas_item_set_sort_children_by_y(RID p_item, bool p_enable);

View File

@ -610,7 +610,7 @@ public:
BIND6(canvas_item_add_mesh, RID, const RID &, const Transform2D &, const Color &, RID, RID) BIND6(canvas_item_add_mesh, RID, const RID &, const Transform2D &, const Color &, RID, RID)
BIND4(canvas_item_add_multimesh, RID, RID, RID, RID) BIND4(canvas_item_add_multimesh, RID, RID, RID, RID)
BIND3(canvas_item_add_texture_rect_animation, RID, const Array &, const real_t) 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_set_transform, RID, const Transform2D &)
BIND2(canvas_item_add_clip_ignore, RID, bool) BIND2(canvas_item_add_clip_ignore, RID, bool)
BIND2(canvas_item_set_sort_children_by_y, RID, bool) BIND2(canvas_item_set_sort_children_by_y, RID, bool)