From a5e42755bebcd0b1d951297cc9a646ba07199135 Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Mon, 11 Sep 2023 18:10:39 +0300 Subject: [PATCH] Correctly redraw map in world view mode --- client/mapView/MapRenderer.cpp | 4 ++-- client/mapView/MapRenderer.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/client/mapView/MapRenderer.cpp b/client/mapView/MapRenderer.cpp index 0b073177a..65a374f97 100644 --- a/client/mapView/MapRenderer.cpp +++ b/client/mapView/MapRenderer.cpp @@ -18,6 +18,7 @@ #include "../render/CAnimation.h" #include "../render/Canvas.h" #include "../render/IImage.h" +#include "../render/Colors.h" #include "../../CCallback.h" @@ -246,7 +247,6 @@ uint8_t MapRendererRoad::checksum(IMapRendererContext & context, const int3 & co MapRendererBorder::MapRendererBorder() { - emptyFill = std::make_unique(Point(32,32)); animation = std::make_unique("EDG"); animation->preload(); } @@ -298,7 +298,7 @@ void MapRendererBorder::renderTile(IMapRendererContext & context, Canvas & targe } else { - target.draw(*emptyFill, Point(0,0)); + target.drawColor(Rect(0,0,32,32), Colors::BLACK); } } diff --git a/client/mapView/MapRenderer.h b/client/mapView/MapRenderer.h index 2ee036f88..d56a37c74 100644 --- a/client/mapView/MapRenderer.h +++ b/client/mapView/MapRenderer.h @@ -90,7 +90,6 @@ public: class MapRendererBorder { std::unique_ptr animation; - std::unique_ptr emptyFill; size_t getIndexForTile(IMapRendererContext & context, const int3 & coordinates);