mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-12-29 00:05:50 +00:00
Little fix to world map partial reveal method coloring.
Bug has gone unnoticed until now.
This commit is contained in:
parent
eb56a93200
commit
43a4f60ab1
1 changed files with 5 additions and 3 deletions
|
@ -48,7 +48,7 @@ namespace WorldMapRenderNamespace
|
|||
VIS_WRITE = 1 // Uses render-to-texture instead
|
||||
};
|
||||
|
||||
VisMethod visMethod = VIS_VERTEX;
|
||||
const VisMethod visMethod = VIS_VERTEX;
|
||||
WorldMapRevealMethod revMethod = REVEAL_DEFAULT;
|
||||
|
||||
std::vector<Quad *> tiles;
|
||||
|
@ -512,6 +512,7 @@ static void tileDataToVis(WorldMapTile *tile, Vector **vis)
|
|||
|
||||
if (data != 0)
|
||||
{
|
||||
const float a = tile->prerevealed ? 0.4f : baseMapSegAlpha;
|
||||
const unsigned int rowSize = MAPVIS_SUBDIV/8;
|
||||
for (unsigned int y = 0; y < MAPVIS_SUBDIV; y++, data += rowSize)
|
||||
{
|
||||
|
@ -520,18 +521,19 @@ static void tileDataToVis(WorldMapTile *tile, Vector **vis)
|
|||
unsigned char dataByte = data[x/8];
|
||||
for (unsigned int x2 = 0; x2 < 8; x2++)
|
||||
{
|
||||
vis[x+x2][y].z = (dataByte & (1 << x2)) ? visibleMapSegAlpha : baseMapSegAlpha;
|
||||
vis[x+x2][y].z = (dataByte & (1 << x2)) ? visibleMapSegAlpha : a;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const float a = tile->prerevealed ? 0.4f : baseMapSegAlpha;
|
||||
for (int x = 0; x < MAPVIS_SUBDIV; x++)
|
||||
{
|
||||
for (int y = 0; y < MAPVIS_SUBDIV; y++)
|
||||
{
|
||||
vis[x][y].z = baseMapSegAlpha;
|
||||
vis[x][y].z = a;
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue