summaryrefslogtreecommitdiff
path: root/scene/resources/tile_set.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-09-01 23:50:59 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-09-01 23:50:59 +0200
commit005aac2dbe2ed590e30e85424100f016c6c65fd6 (patch)
treea976723bc3c18472b13c81f607b0e8260699d80a /scene/resources/tile_set.cpp
parent168f6ca63b6b244273afb69163704bf3212f4206 (diff)
parentb7e2d452336ec3eff6f3393e68443773178c2910 (diff)
Merge pull request #65187 from JohanAR/vector_to_size
Diffstat (limited to 'scene/resources/tile_set.cpp')
-rw-r--r--scene/resources/tile_set.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/scene/resources/tile_set.cpp b/scene/resources/tile_set.cpp
index 376b53b75c..9138a82ba8 100644
--- a/scene/resources/tile_set.cpp
+++ b/scene/resources/tile_set.cpp
@@ -118,7 +118,7 @@ void TileMapPattern::remove_cell(const Vector2i &p_coords, bool p_update_size) {
pattern.erase(p_coords);
if (p_update_size) {
- size = Vector2i();
+ size = Size2i();
for (const KeyValue<Vector2i, TileMapCell> &E : pattern) {
size = size.max(E.key + Vector2i(1, 1));
}
@@ -157,11 +157,11 @@ TypedArray<Vector2i> TileMapPattern::get_used_cells() const {
return a;
}
-Vector2i TileMapPattern::get_size() const {
+Size2i TileMapPattern::get_size() const {
return size;
}
-void TileMapPattern::set_size(const Vector2i &p_size) {
+void TileMapPattern::set_size(const Size2i &p_size) {
for (const KeyValue<Vector2i, TileMapCell> &E : pattern) {
Vector2i coords = E.key;
if (p_size.x <= coords.x || p_size.y <= coords.y) {
@@ -178,7 +178,7 @@ bool TileMapPattern::is_empty() const {
};
void TileMapPattern::clear() {
- size = Vector2i();
+ size = Size2i();
pattern.clear();
emit_changed();
};