mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-01-24 17:26:41 +00:00
fix worldmap selected tile not rendering properly
This commit is contained in:
parent
ff3ae5a0c4
commit
0818fbcdb4
2 changed files with 8 additions and 6 deletions
|
@ -468,7 +468,8 @@ static void tileDataToVis(WorldMapTile *tile, Array2d<Vector>& vis)
|
||||||
{
|
{
|
||||||
const float a = tile->prerevealed ? 0.4f : baseMapSegAlpha;
|
const float a = tile->prerevealed ? 0.4f : baseMapSegAlpha;
|
||||||
Vector *gp = vis.data();
|
Vector *gp = vis.data();
|
||||||
for(size_t i = 0; i < vis.linearsize(); ++i)
|
const size_t n = vis.linearsize();
|
||||||
|
for(size_t i = 0; i < n; ++i)
|
||||||
gp[i].z = a;
|
gp[i].z = a;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -565,6 +566,7 @@ void WorldMapRender::setVis(WorldMapTile *tile)
|
||||||
RenderGrid *g = tile->q->setSegs(MAPVIS_SUBDIV, MAPVIS_SUBDIV, 0, 0, 0, 0, 2.0, 1);
|
RenderGrid *g = tile->q->setSegs(MAPVIS_SUBDIV, MAPVIS_SUBDIV, 0, 0, 0, 0, 2.0, 1);
|
||||||
if(g)
|
if(g)
|
||||||
{
|
{
|
||||||
|
g->gridType = GRID_UNDEFINED;
|
||||||
g->drawOrder = GRID_DRAW_WORLDMAP;
|
g->drawOrder = GRID_DRAW_WORLDMAP;
|
||||||
tileDataToVis(tile, g->array2d());
|
tileDataToVis(tile, g->array2d());
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,19 +8,19 @@ struct RenderState;
|
||||||
|
|
||||||
enum GridDrawOrder
|
enum GridDrawOrder
|
||||||
{
|
{
|
||||||
GRID_DRAW_WORLDMAP = -1, // LRTB order, uses grid.z as alpha
|
|
||||||
GRID_DRAW_LRTB = 0, // the default. ignores grid.z
|
GRID_DRAW_LRTB = 0, // the default. ignores grid.z
|
||||||
GRID_DRAW_LRBT = 1, // Y axis inverted
|
GRID_DRAW_LRBT = 1, // Y axis inverted
|
||||||
|
GRID_DRAW_WORLDMAP = 2, // LRTB order, uses grid.z as alpha
|
||||||
|
|
||||||
GRID_DRAW_DEFAULT = GRID_DRAW_LRTB
|
GRID_DRAW_DEFAULT = GRID_DRAW_LRTB
|
||||||
};
|
};
|
||||||
|
|
||||||
enum GridType
|
enum GridType
|
||||||
{
|
{
|
||||||
GRID_UNDEFINED = -1,
|
GRID_UNDEFINED = 0,
|
||||||
GRID_WAVY = 0,
|
GRID_WAVY = 1,
|
||||||
GRID_STRIP = 1, // quad is in strip mode
|
GRID_STRIP = 2, // quad is in strip mode
|
||||||
GRID_INTERP = 2, // quad is in grid mode
|
GRID_INTERP = 3, // quad is in grid mode
|
||||||
};
|
};
|
||||||
|
|
||||||
class RenderGrid
|
class RenderGrid
|
||||||
|
|
Loading…
Reference in a new issue