1
0
Fork 0

(svn r5350) -Backport: r5327

Use DrawFoundation() for houses
-Fix: Some graphical glitches on house tiles with foundations
-Fix: The selection cursor is now aligned with the top of the foundation for house tiles
release/0.4
tron 2006-06-24 09:48:51 +00:00
parent 20b5c17faa
commit e3e64430d7
1 changed files with 5 additions and 13 deletions

View File

@ -3,6 +3,7 @@
#include "stdafx.h"
#include "openttd.h"
#include "functions.h"
#include "slope.h"
#include "strings.h"
#include "table/strings.h"
#include "table/sprites.h"
@ -89,7 +90,6 @@ static TownDrawTileProc * const _town_draw_tile_procs[1] = {
static void DrawTile_Town(TileInfo *ti)
{
const DrawTownTileStruct *dcts;
byte z;
uint32 image;
/* Retrieve pointer to the draw town tile struct */
@ -106,17 +106,8 @@ static void DrawTile_Town(TileInfo *ti)
dcts = &_town_draw_tile_data[gfx << 4 | variant << 2 | stage];
}
z = ti->z;
/* Add bricks below the house? */
if (ti->tileh) {
AddSortableSpriteToDraw(SPR_FOUNDATION_BASE + ti->tileh, ti->x, ti->y, 16, 16, 7, z);
AddChildSpriteScreen(dcts->sprite_1, 0x1F, 1);
z += 8;
} else {
/* Else draw regular ground */
DrawGroundSprite(dcts->sprite_1);
}
if (ti->tileh != SLOPE_FLAT) DrawFoundation(ti, ti->tileh);
DrawGroundSprite(dcts->sprite_1);
/* Add a house on top of the ground? */
image = dcts->sprite_2;
@ -129,7 +120,8 @@ static void DrawTile_Town(TileInfo *ti)
dcts->width + 1,
dcts->height + 1,
dcts->dz,
z);
ti->z
);
if (_display_opt & DO_TRANS_BUILDINGS) return;
}