From e3c6d957fa54783bb76cb44bc560d86bb30559e3 Mon Sep 17 00:00:00 2001 From: Andrettin Date: Wed, 24 Oct 2018 08:02:59 +0200 Subject: [PATCH] The fog of war code now uses PixelTileSize rather than 32 as a literal number --- src/map/map_fog.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/map/map_fog.cpp b/src/map/map_fog.cpp index 9abd625a7..06c5cb49f 100644 --- a/src/map/map_fog.cpp +++ b/src/map/map_fog.cpp @@ -975,9 +975,9 @@ static void GetFogOfWarTile(int sx, int sy, int *fogTile, int *blackFogTile, int // *blackFogTile = FogTable[blackFogTileIndex]; //apply variation according to tile index (sx is equal to the tile index, so let's use it) int FogTileVariation = 0; - if (sx % 3 == 0 && Map.FogGraphic->Surface->h / 32 >= 3) { + if (sx % 3 == 0 && Map.FogGraphic->Surface->h / PixelTileSize.y >= 3) { FogTileVariation = 2; - } else if (sx % 2 == 0 && Map.FogGraphic->Surface->h / 32 >= 2) { + } else if (sx % 2 == 0 && Map.FogGraphic->Surface->h / PixelTileSize.y >= 2) { FogTileVariation = 1; } if (FogTable[fogTileIndex] && FogTable[fogTileIndex] != 16) { @@ -1195,7 +1195,7 @@ void CMap::InitFogOfWar() AlphaFogG->GraphicHeight = s->h; //Wyrmgus start // AlphaFogG->NumFrames = 16;//1; - AlphaFogG->NumFrames = 16 * (s->h / 32);//1; + AlphaFogG->NumFrames = 16 * (s->h / PixelTileSize.y);//1; //Wyrmgus end AlphaFogG->GenFramesMap(); AlphaFogG->UseDisplayFormat();