Changeset - r14313:e2eb4e3bce67
[Not reviewed]
master
0 3 0
yexo - 14 years ago 2010-01-21 13:34:05
yexo@openttd.org
(svn r18876) -Codechange: make sure m4 is always 0 for non-railroad station tiles
3 files changed with 31 insertions and 31 deletions:
0 comments (0 inline, 0 general)
docs/landscape_grid.html
Show inline comments
 
@@ -206,7 +206,7 @@ the array so you can quickly see what is
 
      <td class="bits">-inherit-</td>
 
      <td class="bits">-inherit-</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="free">OO</span>XX 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
 
      <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="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="free">OO</span>XX X<span class="free">O</span>XX</td>
 
      <td class="bits"><span class="free">OOOO OOOO</span></td>
 
@@ -228,7 +228,7 @@ the array so you can quickly see what is
 
      <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="option">~~~~ ~~~~</span></td>
 
      <td class="bits"><span class="free">OOOO OOOO</span></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">OOOO OOOO</span></td>
 
@@ -239,7 +239,7 @@ the array so you can quickly see what is
 
      <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="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="free">OO</span>XX X<span class="free">O</span>XX</td>
 
      <td class="bits"><span class="free">OOOO OOOO</span></td>
 
@@ -250,7 +250,7 @@ the array so you can quickly see what is
 
      <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="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="free">OO</span>XX X<span class="free">O</span>XX</td>
 
      <td class="bits"><span class="free">OOOO OOOO</span></td>
src/station_cmd.cpp
Show inline comments
 
@@ -2309,20 +2309,42 @@ static void DrawTile_Station(TileInfo *t
 
	RoadTypes roadtypes;
 
	int32 total_offset;
 
	int32 custom_ground_offset;
 
	uint32 relocation = 0;
 
	const BaseStation *st = NULL;
 
	const StationSpec *statspec = NULL;
 

	
 
	if (HasStationRail(ti->tile)) {
 
		const RailtypeInfo *rti = GetRailTypeInfo(GetRailType(ti->tile));
 
		roadtypes = ROADTYPES_NONE;
 
		total_offset = rti->total_offset;
 
		custom_ground_offset = rti->custom_ground_offset;
 

	
 
		if (IsCustomStationSpecIndex(ti->tile)) {
 
			/* look for customization */
 
			st = BaseStation::GetByTile(ti->tile);
 
			statspec = st->speclist[GetCustomStationSpecIndex(ti->tile)].spec;
 

	
 
			if (statspec != NULL) {
 
				uint tile = GetStationGfx(ti->tile);
 

	
 
				relocation = GetCustomStationRelocation(statspec, st, ti->tile);
 

	
 
				if (HasBit(statspec->callback_mask, CBM_STATION_SPRITE_LAYOUT)) {
 
					uint16 callback = GetStationCallback(CBID_STATION_SPRITE_LAYOUT, 0, 0, statspec, st, ti->tile);
 
					if (callback != CALLBACK_FAILED) tile = (callback & ~1) + GetRailStationAxis(ti->tile);
 
				}
 

	
 
				/* Ensure the chosen tile layout is valid for this custom station */
 
				if (statspec->renderdata != NULL) {
 
					t = &statspec->renderdata[tile < statspec->tiles ? tile : (uint)GetRailStationAxis(ti->tile)];
 
				}
 
			}
 
		}
 
	} 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;
 
@@ -2333,28 +2355,6 @@ static void DrawTile_Station(TileInfo *t
 
		palette = PALETTE_TO_GREY;
 
	}
 

	
 
	if (IsCustomStationSpecIndex(ti->tile)) {
 
		/* look for customization */
 
		st = BaseStation::GetByTile(ti->tile);
 
		statspec = st->speclist[GetCustomStationSpecIndex(ti->tile)].spec;
 

	
 
		if (statspec != NULL) {
 
			uint tile = GetStationGfx(ti->tile);
 

	
 
			relocation = GetCustomStationRelocation(statspec, st, ti->tile);
 

	
 
			if (HasBit(statspec->callback_mask, CBM_STATION_SPRITE_LAYOUT)) {
 
				uint16 callback = GetStationCallback(CBID_STATION_SPRITE_LAYOUT, 0, 0, statspec, st, ti->tile);
 
				if (callback != CALLBACK_FAILED) tile = (callback & ~1) + GetRailStationAxis(ti->tile);
 
			}
 

	
 
			/* Ensure the chosen tile layout is valid for this custom station */
 
			if (statspec->renderdata != NULL) {
 
				t = &statspec->renderdata[tile < statspec->tiles ? tile : (uint)GetRailStationAxis(ti->tile)];
 
			}
 
		}
 
	}
 

	
 
	if (t == NULL || t->seq == NULL) t = &_station_display_datas[GetStationType(ti->tile)][GetStationGfx(ti->tile)];
 

	
 
	/* don't show foundation for docks */
src/station_map.h
Show inline comments
 
@@ -401,7 +401,7 @@ static inline TileIndexDiffC GetDockOffs
 

	
 
static inline bool IsCustomStationSpecIndex(TileIndex t)
 
{
 
	assert(IsTileType(t, MP_STATION));
 
	assert(HasStationTileRail(t));
 
	return _m[t].m4 != 0;
 
}
 

	
0 comments (0 inline, 0 general)