1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-09-16 09:26:28 +02:00

Add pitch black FoW representation for dimension door range map overlay

This commit is contained in:
Dydzio
2024-03-27 21:39:36 +01:00
parent 807035c321
commit e0855ceb7a

View File

@@ -353,6 +353,9 @@ void MapRendererFow::renderTile(IMapRendererContext & context, Canvas & target,
size_t pseudorandomNumber = ((coordinates.x * 997) ^ (coordinates.y * 1009)) / 101;
size_t imageIndex = pseudorandomNumber % fogOfWarFullHide->size();
if (context.showSpellRange(coordinates))
target.drawColor(Rect(0,0,32,32), Colors::BLACK);
else
target.draw(fogOfWarFullHide->getImage(imageIndex), Point(0, 0));
}
else
@@ -363,6 +366,9 @@ void MapRendererFow::renderTile(IMapRendererContext & context, Canvas & target,
uint8_t MapRendererFow::checksum(IMapRendererContext & context, const int3 & coordinates)
{
if (context.showSpellRange(coordinates))
return 0xff - 2;
const NeighborTilesInfo neighborInfo(context, coordinates);
int retBitmapID = neighborInfo.getBitmapID();
if(retBitmapID < 0)