mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r8636) [0.5] -Backport from trunk (8634, 8635):
-Fix: draw canal edges under buoys that are in a canal -Codechange: replace missing sprites with a red question mark
This commit is contained in:
parent
87bbb7a413
commit
f8b2fb4484
|
@ -92,11 +92,10 @@ static void* ReadSprite(SpriteID id)
|
|||
DEBUG(spritecache, 9) ("load sprite %d", id);
|
||||
|
||||
if (!SpriteExists(id)) {
|
||||
error(
|
||||
"Tried to load non-existing sprite #%d.\n"
|
||||
"Probable cause: Wrong/missing NewGRFs",
|
||||
id
|
||||
);
|
||||
DEBUG(spritecache, 1) ("Tried to load non-existing sprite #%d. Probable cause: Wrong/missing NewGRFs", id);
|
||||
|
||||
/* SPR_IMG_QUERY is a BIG FAT RED ? */
|
||||
id = SPR_IMG_QUERY;
|
||||
}
|
||||
|
||||
FioSeekToFile(_sprite_file_pos[id]);
|
||||
|
|
|
@ -2070,6 +2070,9 @@ const DrawTileSprites *GetStationTileLayout(byte gfx)
|
|||
return &_station_display_datas[gfx];
|
||||
}
|
||||
|
||||
/* For drawing canal edges on buoys */
|
||||
extern void DrawCanalWater(TileIndex tile);
|
||||
|
||||
static void DrawTile_Station(TileInfo *ti)
|
||||
{
|
||||
uint32 image;
|
||||
|
@ -2136,6 +2139,8 @@ static void DrawTile_Station(TileInfo *ti)
|
|||
|
||||
if (GetRailType(ti->tile) == RAILTYPE_ELECTRIC && IsStationTileElectrifiable(ti->tile)) DrawCatenary(ti);
|
||||
|
||||
if (IsBuoyTile(ti->tile) && (ti->z != 0 || !IsTileOwner(ti->tile, OWNER_WATER))) DrawCanalWater(ti->tile);
|
||||
|
||||
foreach_draw_tile_seq(dtss, t->seq) {
|
||||
image = dtss->image;
|
||||
if (relocation == 0 || HASBIT(image, 30)) {
|
||||
|
|
|
@ -448,7 +448,9 @@ static const DrawTileSeqStruct _station_display_datas_81[] = {
|
|||
TILE_SEQ_END()
|
||||
};
|
||||
|
||||
/* Buoy, which will _always_ drown under the ship */
|
||||
static const DrawTileSeqStruct _station_display_datas_82[] = {
|
||||
{ 4, -1, 0, 0, 0, 0, SPR_IMG_BOUY },
|
||||
TILE_SEQ_END()
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue