mirror of https://github.com/OpenTTD/OpenTTD
(svn r18876) -Codechange: make sure m4 is always 0 for non-railroad station tiles
parent
f608ad7baf
commit
18e7ec6b3e
|
@ -206,7 +206,7 @@ the array so you can quickly see what is used and what is not.
|
||||||
<td class="bits">-inherit-</td>
|
<td class="bits">-inherit-</td>
|
||||||
<td class="bits">-inherit-</td>
|
<td class="bits">-inherit-</td>
|
||||||
<td class="bits">XXXX <span class="free">OOOO</span></td>
|
<td class="bits">XXXX <span class="free">OOOO</span></td>
|
||||||
<td class="bits"><span class="option">~~~~ ~~~~</span></td>
|
<td class="bits"><span class="free">OOOO OOOO</span></td>
|
||||||
<td class="bits"><span class="option">~~~~ ~</span>XXX</td>
|
<td class="bits"><span class="option">~~~~ ~</span>XXX</td>
|
||||||
<td class="bits"><span class="free">OO</span>XX XXXX</td>
|
<td class="bits"><span class="free">OO</span>XX XXXX</td>
|
||||||
<td class="bits">XX<span class="free">O</span>X XXXX</td>
|
<td class="bits">XX<span class="free">O</span>X XXXX</td>
|
||||||
|
@ -217,7 +217,7 @@ the array so you can quickly see what is used and what is not.
|
||||||
<td class="bits">-inherit-</td>
|
<td class="bits">-inherit-</td>
|
||||||
<td class="bits">-inherit-</td>
|
<td class="bits">-inherit-</td>
|
||||||
<td class="bits"><span class="free">OOOO OO</span>XX</td>
|
<td class="bits"><span class="free">OOOO OO</span>XX</td>
|
||||||
<td class="bits"><span class="option">~~~~ ~~~~</span></td>
|
<td class="bits"><span class="free">OOOO OOOO</span></td>
|
||||||
<td class="bits"><span class="option">~~~~ ~</span>XXX</td>
|
<td class="bits"><span class="option">~~~~ ~</span>XXX</td>
|
||||||
<td class="bits"><span class="free">OO</span>XX X<span class="free">O</span>XX</td>
|
<td class="bits"><span class="free">OO</span>XX X<span class="free">O</span>XX</td>
|
||||||
<td class="bits"><span class="free">OOOO OOOO</span></td>
|
<td class="bits"><span class="free">OOOO OOOO</span></td>
|
||||||
|
@ -228,7 +228,7 @@ the array so you can quickly see what is used and what is not.
|
||||||
<td class="bits">-inherit-</td>
|
<td class="bits">-inherit-</td>
|
||||||
<td class="bits">-inherit-</td>
|
<td class="bits">-inherit-</td>
|
||||||
<td class="bits"><span class="free">OOOO OOOO</span></td>
|
<td class="bits"><span class="free">OOOO OOOO</span></td>
|
||||||
<td class="bits"><span class="option">~~~~ ~~~~</span></td>
|
<td class="bits"><span class="free">OOOO OOOO</span></td>
|
||||||
<td class="bits">XXXX XXXX</td>
|
<td class="bits">XXXX XXXX</td>
|
||||||
<td class="bits"><span class="free">OO</span>XX X<span class="free">O</span>XX</td>
|
<td class="bits"><span class="free">OO</span>XX X<span class="free">O</span>XX</td>
|
||||||
<td class="bits"><span class="free">OOOO OOOO</span></td>
|
<td class="bits"><span class="free">OOOO OOOO</span></td>
|
||||||
|
@ -239,7 +239,7 @@ the array so you can quickly see what is used and what is not.
|
||||||
<td class="bits">-inherit-</td>
|
<td class="bits">-inherit-</td>
|
||||||
<td class="bits">-inherit-</td>
|
<td class="bits">-inherit-</td>
|
||||||
<td class="bits"><span class="free">OOOO OO</span>XX</td>
|
<td class="bits"><span class="free">OOOO OO</span>XX</td>
|
||||||
<td class="bits"><span class="option">~~~~ ~~~~</span></td>
|
<td class="bits"><span class="free">OOOO OOOO</span></td>
|
||||||
<td class="bits"><span class="option">~~~~ ~~~~</span></td>
|
<td class="bits"><span class="option">~~~~ ~~~~</span></td>
|
||||||
<td class="bits"><span class="free">OO</span>XX X<span class="free">O</span>XX</td>
|
<td class="bits"><span class="free">OO</span>XX X<span class="free">O</span>XX</td>
|
||||||
<td class="bits"><span class="free">OOOO OOOO</span></td>
|
<td class="bits"><span class="free">OOOO OOOO</span></td>
|
||||||
|
@ -250,7 +250,7 @@ the array so you can quickly see what is used and what is not.
|
||||||
<td class="bits">-inherit-</td>
|
<td class="bits">-inherit-</td>
|
||||||
<td class="bits">-inherit-</td>
|
<td class="bits">-inherit-</td>
|
||||||
<td class="bits"><span class="free">OOOO OOOO</span></td>
|
<td class="bits"><span class="free">OOOO OOOO</span></td>
|
||||||
<td class="bits"><span class="option">~~~~ ~~~~</span></td>
|
<td class="bits"><span class="free">OOOO OOOO</span></td>
|
||||||
<td class="bits"><span class="option">~~~~ ~~~~</span></td>
|
<td class="bits"><span class="option">~~~~ ~~~~</span></td>
|
||||||
<td class="bits"><span class="free">OO</span>XX X<span class="free">O</span>XX</td>
|
<td class="bits"><span class="free">OO</span>XX X<span class="free">O</span>XX</td>
|
||||||
<td class="bits"><span class="free">OOOO OOOO</span></td>
|
<td class="bits"><span class="free">OOOO OOOO</span></td>
|
||||||
|
|
|
@ -2309,29 +2309,15 @@ static void DrawTile_Station(TileInfo *ti)
|
||||||
RoadTypes roadtypes;
|
RoadTypes roadtypes;
|
||||||
int32 total_offset;
|
int32 total_offset;
|
||||||
int32 custom_ground_offset;
|
int32 custom_ground_offset;
|
||||||
|
uint32 relocation = 0;
|
||||||
|
const BaseStation *st = NULL;
|
||||||
|
const StationSpec *statspec = NULL;
|
||||||
|
|
||||||
if (HasStationRail(ti->tile)) {
|
if (HasStationRail(ti->tile)) {
|
||||||
const RailtypeInfo *rti = GetRailTypeInfo(GetRailType(ti->tile));
|
const RailtypeInfo *rti = GetRailTypeInfo(GetRailType(ti->tile));
|
||||||
roadtypes = ROADTYPES_NONE;
|
roadtypes = ROADTYPES_NONE;
|
||||||
total_offset = rti->total_offset;
|
total_offset = rti->total_offset;
|
||||||
custom_ground_offset = rti->custom_ground_offset;
|
custom_ground_offset = rti->custom_ground_offset;
|
||||||
} else {
|
|
||||||
roadtypes = IsRoadStop(ti->tile) ? GetRoadTypes(ti->tile) : ROADTYPES_NONE;
|
|
||||||
total_offset = 0;
|
|
||||||
custom_ground_offset = 0;
|
|
||||||
}
|
|
||||||
uint32 relocation = 0;
|
|
||||||
const BaseStation *st = NULL;
|
|
||||||
const StationSpec *statspec = NULL;
|
|
||||||
Owner owner = GetTileOwner(ti->tile);
|
|
||||||
|
|
||||||
PaletteID palette;
|
|
||||||
if (Company::IsValidID(owner)) {
|
|
||||||
palette = COMPANY_SPRITE_COLOUR(owner);
|
|
||||||
} else {
|
|
||||||
/* Some stations are not owner by a company, namely oil rigs */
|
|
||||||
palette = PALETTE_TO_GREY;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (IsCustomStationSpecIndex(ti->tile)) {
|
if (IsCustomStationSpecIndex(ti->tile)) {
|
||||||
/* look for customization */
|
/* look for customization */
|
||||||
|
@ -2354,6 +2340,20 @@ static void DrawTile_Station(TileInfo *ti)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
roadtypes = IsRoadStop(ti->tile) ? GetRoadTypes(ti->tile) : ROADTYPES_NONE;
|
||||||
|
total_offset = 0;
|
||||||
|
custom_ground_offset = 0;
|
||||||
|
}
|
||||||
|
Owner owner = GetTileOwner(ti->tile);
|
||||||
|
|
||||||
|
PaletteID palette;
|
||||||
|
if (Company::IsValidID(owner)) {
|
||||||
|
palette = COMPANY_SPRITE_COLOUR(owner);
|
||||||
|
} else {
|
||||||
|
/* Some stations are not owner by a company, namely oil rigs */
|
||||||
|
palette = PALETTE_TO_GREY;
|
||||||
|
}
|
||||||
|
|
||||||
if (t == NULL || t->seq == NULL) t = &_station_display_datas[GetStationType(ti->tile)][GetStationGfx(ti->tile)];
|
if (t == NULL || t->seq == NULL) t = &_station_display_datas[GetStationType(ti->tile)][GetStationGfx(ti->tile)];
|
||||||
|
|
||||||
|
|
|
@ -401,7 +401,7 @@ static inline TileIndexDiffC GetDockOffset(TileIndex t)
|
||||||
|
|
||||||
static inline bool IsCustomStationSpecIndex(TileIndex t)
|
static inline bool IsCustomStationSpecIndex(TileIndex t)
|
||||||
{
|
{
|
||||||
assert(IsTileType(t, MP_STATION));
|
assert(HasStationTileRail(t));
|
||||||
return _m[t].m4 != 0;
|
return _m[t].m4 != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue