Skip to content

Commit

Permalink
The fog of war code now uses PixelTileSize rather than 32 as a litera…
Browse files Browse the repository at this point in the history
…l number
  • Loading branch information
Andrettin committed Oct 24, 2018
1 parent 0478b2d commit e3c6d95
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/map/map_fog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit e3c6d95

Please sign in to comment.