Przeglądaj źródła

Correctly redraw map in world view mode

Ivan Savenko 2 lat temu
rodzic
commit
a5e42755be
2 zmienionych plików z 2 dodań i 3 usunięć
  1. 2 2
      client/mapView/MapRenderer.cpp
  2. 0 1
      client/mapView/MapRenderer.h

+ 2 - 2
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<Canvas>(Point(32,32));
 	animation = std::make_unique<CAnimation>("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);
 	}
 }
 

+ 0 - 1
client/mapView/MapRenderer.h

@@ -90,7 +90,6 @@ public:
 class MapRendererBorder
 {
 	std::unique_ptr<CAnimation> animation;
-	std::unique_ptr<Canvas> emptyFill;
 
 	size_t getIndexForTile(IMapRendererContext & context, const int3 & coordinates);