diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2021-05-20 14:32:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-20 14:32:40 +0200 |
commit | a6a75e2c095d67ffb5a40a6e65f9901bcfd54667 (patch) | |
tree | eab6a887e4fea6639f66b48dbe7e23eed5411a0d /scene/2d/tile_map.h | |
parent | 342f3efc7ec41f3a4e439c0c0e6a2d0f0f2fbe41 (diff) | |
parent | d8bb53cd2194fed58f1a55e60b9f1b863c6e9cc7 (diff) | |
download | redot-engine-a6a75e2c095d67ffb5a40a6e65f9901bcfd54667.tar.gz |
Merge pull request #48812 from groud/tilemap_scenes_painting
Implement scenes tiles in TileMaps
Diffstat (limited to 'scene/2d/tile_map.h')
-rw-r--r-- | scene/2d/tile_map.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/scene/2d/tile_map.h b/scene/2d/tile_map.h index e9dbccbdb9..2703e1980e 100644 --- a/scene/2d/tile_map.h +++ b/scene/2d/tile_map.h @@ -48,7 +48,7 @@ union TileMapCell { }; uint64_t _u64t; - TileMapCell(int p_source_id = -1, Vector2i p_atlas_coords = TileSetAtlasSource::INVALID_ATLAS_COORDS, int p_alternative_tile = TileSetAtlasSource::INVALID_TILE_ALTERNATIVE) { + TileMapCell(int p_source_id = -1, Vector2i p_atlas_coords = TileSetSource::INVALID_ATLAS_COORDS, int p_alternative_tile = TileSetSource::INVALID_TILE_ALTERNATIVE) { source_id = p_source_id; set_atlas_coords(p_atlas_coords); alternative_tile = p_alternative_tile; @@ -112,16 +112,19 @@ struct TileMapQuadrant { // Debug. RID debug_canvas_item; - // Rendering + // Rendering. List<RID> canvas_items; List<RID> occluders; // Physics. List<RID> bodies; - // Navigation + // Navigation. Map<Vector2i, Vector<RID>> navigation_regions; + // Scenes. + Map<Vector2i, String> scenes; + void operator=(const TileMapQuadrant &q) { coords = q.coords; debug_canvas_item = q.debug_canvas_item; @@ -248,7 +251,7 @@ public: void set_quadrant_size(int p_size); int get_quadrant_size() const; - void set_cell(const Vector2i &p_coords, int p_source_id = -1, const Vector2i p_atlas_coords = TileSetAtlasSource::INVALID_ATLAS_COORDS, int p_alternative_tile = TileSetAtlasSource::INVALID_TILE_ALTERNATIVE); + void set_cell(const Vector2i &p_coords, int p_source_id = -1, const Vector2i p_atlas_coords = TileSetSource::INVALID_ATLAS_COORDS, int p_alternative_tile = TileSetSource::INVALID_TILE_ALTERNATIVE); int get_cell_source_id(const Vector2i &p_coords) const; Vector2i get_cell_atlas_coords(const Vector2i &p_coords) const; int get_cell_alternative_tile(const Vector2i &p_coords) const; |