|
@@ -1734,73 +1734,73 @@ static void DrawTile_Station(TileInfo *t
|
|
|
uint owner = _map_owner[ti->tile];
|
|
|
image_or_modificator = 0x315 << 16; /* NOTE: possible bug in ttd here? */
|
|
|
if (owner < MAX_PLAYERS)
|
|
|
image_or_modificator = PLAYER_SPRITE_COLOR(owner);
|
|
|
}
|
|
|
|
|
|
// don't show foundation for docks (docks are between 76 (0x4C) and 81 (0x51))
|
|
|
if (ti->tileh != 0 && (ti->map5 < 0x4C || ti->map5 > 0x51))
|
|
|
DrawFoundation(ti, ti->tileh);
|
|
|
|
|
|
t = _station_display_datas[ti->map5];
|
|
|
|
|
|
image = *(uint32*)t;
|
|
|
image = *(const uint32*)t;
|
|
|
t += sizeof(uint32);
|
|
|
if (image & 0x8000)
|
|
|
image |= image_or_modificator;
|
|
|
DrawGroundSprite(image + base_img);
|
|
|
|
|
|
for(dtss = (DrawTileSeqStruct *)t; (byte)dtss->delta_x != 0x80; dtss++) {
|
|
|
for(dtss = (const DrawTileSeqStruct *)t; (byte)dtss->delta_x != 0x80; dtss++) {
|
|
|
if ((byte)dtss->delta_z != 0x80) {
|
|
|
image = dtss->image + base_img;
|
|
|
if (_display_opt & DO_TRANS_BUILDINGS) {
|
|
|
if (image&0x8000) image |= image_or_modificator;
|
|
|
} else {
|
|
|
image = (image & 0x3FFF) | 0x03224000;
|
|
|
}
|
|
|
|
|
|
AddSortableSpriteToDraw(image, ti->x + dtss->delta_x, ti->y + dtss->delta_y, dtss->width, dtss->height, dtss->unk, ti->z + dtss->delta_z);
|
|
|
} else {
|
|
|
image = *(uint32*)&dtss->height + base_img; /* endian ok */
|
|
|
image = *(const uint32*)&dtss->height + base_img; /* endian ok */
|
|
|
|
|
|
if (_display_opt & DO_TRANS_BUILDINGS) {
|
|
|
if (image&0x8000) image |= image_or_modificator;
|
|
|
} else {
|
|
|
image = (image & 0x3FFF) | 0x03224000;
|
|
|
}
|
|
|
AddChildSpriteScreen(image, dtss->delta_x, dtss->delta_y);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
void StationPickerDrawSprite(int x, int y, int railtype, int image)
|
|
|
{
|
|
|
uint32 ormod, img;
|
|
|
const DrawTileSeqStruct *dtss;
|
|
|
const byte *t;
|
|
|
|
|
|
/* baseimage */
|
|
|
railtype *= TRACKTYPE_SPRITE_PITCH;
|
|
|
|
|
|
ormod = PLAYER_SPRITE_COLOR(_local_player);
|
|
|
|
|
|
t = _station_display_datas[image];
|
|
|
|
|
|
img = *(uint32*)t;
|
|
|
img = *(const uint32*)t;
|
|
|
t += sizeof(uint32);
|
|
|
if (img & 0x8000)
|
|
|
img |= ormod;
|
|
|
DrawSprite(img, x, y);
|
|
|
|
|
|
for(dtss = (DrawTileSeqStruct *)t; (byte)dtss->delta_x != 0x80; dtss++) {
|
|
|
for(dtss = (const DrawTileSeqStruct *)t; (byte)dtss->delta_x != 0x80; dtss++) {
|
|
|
Point pt = RemapCoords(dtss->delta_x, dtss->delta_y, dtss->delta_z);
|
|
|
DrawSprite((dtss->image | ormod) + railtype, x + pt.x, y + pt.y);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
static uint GetSlopeZ_Station(TileInfo *ti)
|
|
|
{
|
|
|
uint z = ti->z;
|
|
|
if (ti->tileh != 0)
|
|
|
z += 8;
|
|
|
return z;
|
|
|
}
|