TileAtlasVX: Fix table extents being covered by below tiles

Fixes the appearance of tables in VX, which place table
tiles on the same layer as ground tiles.
This commit is contained in:
Jonas Kulla 2015-05-31 20:58:05 +02:00
parent e4bc08e972
commit d5bacf50f5
1 changed files with 6 additions and 1 deletions

View File

@ -607,7 +607,12 @@ static void
readLayer(Reader &reader, const Table &data,
const Table *flags, int ox, int oy, int w, int h, int z)
{
for (int y = 0; y < h; ++y)
/* The table autotile pattern (A2) has two quads (table
* legs, etc.) which extend over the tile below. We process
* the tiles in rows from bottom to top so the table extents
* are added after the tile below and drawn over it. */
for (int y = h-1; y >= 0; --y)
for (int x = 0; x < w; ++x)
{
int16_t tileID = tableGetWrapped(data, x+ox, y+oy, z);