diff options
Diffstat (limited to 'scene/2d/tile_map.h')
-rw-r--r-- | scene/2d/tile_map.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scene/2d/tile_map.h b/scene/2d/tile_map.h index e9c1cb0c11..1f3c672f17 100644 --- a/scene/2d/tile_map.h +++ b/scene/2d/tile_map.h @@ -39,7 +39,7 @@ class TileSetAtlasSource; struct TileMapQuadrant { struct CoordsWorldComparator { - _ALWAYS_INLINE_ bool operator()(const Vector2i &p_a, const Vector2i &p_b) const { + _ALWAYS_INLINE_ bool operator()(const Vector2 &p_a, const Vector2 &p_b) const { // We sort the cells by their local coords, as it is needed by rendering. if (p_a.y == p_b.y) { return p_a.x > p_b.x; @@ -60,8 +60,8 @@ struct TileMapQuadrant { RBSet<Vector2i> cells; // We need those two maps to sort by local position for rendering // This is kind of workaround, it would be better to sort the cells directly in the "cells" set instead. - RBMap<Vector2i, Vector2i> map_to_local; - RBMap<Vector2i, Vector2i, CoordsWorldComparator> local_to_map; + RBMap<Vector2i, Vector2> map_to_local; + RBMap<Vector2, Vector2i, CoordsWorldComparator> local_to_map; // Debug. RID debug_canvas_item; @@ -311,7 +311,7 @@ public: void set_quadrant_size(int p_size); int get_quadrant_size() const; - static void draw_tile(RID p_canvas_item, const Vector2i &p_position, const Ref<TileSet> p_tile_set, int p_atlas_source_id, const Vector2i &p_atlas_coords, int p_alternative_tile, int p_frame = -1, Color p_modulation = Color(1.0, 1.0, 1.0, 1.0), const TileData *p_tile_data_override = nullptr); + static void draw_tile(RID p_canvas_item, const Vector2 &p_position, const Ref<TileSet> p_tile_set, int p_atlas_source_id, const Vector2i &p_atlas_coords, int p_alternative_tile, int p_frame = -1, Color p_modulation = Color(1.0, 1.0, 1.0, 1.0), const TileData *p_tile_data_override = nullptr); // Layers management. int get_layers_count() const; |