Changeset - r15746:21a9eef562ba
[Not reviewed]
master
0 4 0
frosch - 14 years ago 2010-08-09 07:32:04
frosch@openttd.org
(svn r20423) -Change [FS#3947]: Make snow on bridges depend on bridgeheight.
4 files changed with 11 insertions and 6 deletions:
0 comments (0 inline, 0 general)
src/elrail.cpp
Show inline comments
 
@@ -503,14 +503,14 @@ void DrawCatenaryOnBridge(const TileInfo
 

	
 
	height = GetBridgeHeight(end);
 

	
 
	SpriteID wire_base = GetWireBase(end);
 
	SpriteID wire_base = GetWireBase(end, TC_ON_BRIDGE);
 

	
 
	AddSortableSpriteToDraw(wire_base + sss->image_offset, PAL_NONE, ti->x + sss->x_offset, ti->y + sss->y_offset,
 
		sss->x_size, sss->y_size, sss->z_size, height + sss->z_offset,
 
		IsTransparencySet(TO_CATENARY)
 
	);
 

	
 
	SpriteID pylon_base = GetPylonBase(end);
 
	SpriteID pylon_base = GetPylonBase(end, TC_ON_BRIDGE);
 

	
 
	/* Finished with wires, draw pylons
 
	 * every other tile needs a pylon on the northern end */
src/newgrf_commons.cpp
Show inline comments
 
@@ -333,9 +333,13 @@ uint32 GetTerrainType(TileIndex tile, Ti
 
				}
 

	
 
				case MP_TUNNELBRIDGE:
 
					/* During map generation the snowstate may not be valid yet, as the tileloop may not have run yet. */
 
					if (_generating_world) goto genworld; // we do not care about foundations here
 
					has_snow = HasTunnelBridgeSnowOrDesert(tile);
 
					if (context == TC_ON_BRIDGE) {
 
						has_snow = (GetBridgeHeight(tile) > GetSnowLine());
 
					} else {
 
						/* During map generation the snowstate may not be valid yet, as the tileloop may not have run yet. */
 
						if (_generating_world) goto genworld; // we do not care about foundations here
 
						has_snow = HasTunnelBridgeSnowOrDesert(tile);
 
					}
 
					break;
 

	
 
				case MP_STATION:
src/newgrf_commons.h
Show inline comments
 
@@ -21,6 +21,7 @@
 
enum TileContext {
 
	TC_NORMAL,         ///< Nothing special.
 
	TC_UPPER_HALFTILE, ///< Querying information about the upper part of a tile with halftile foundation.
 
	TC_ON_BRIDGE,      ///< Querying information about stuff on the bridge (via some bridgehead).
 
};
 

	
 
/**
src/tunnelbridge_cmd.cpp
Show inline comments
 
@@ -1253,7 +1253,7 @@ void DrawBridgeMiddle(const TileInfo *ti
 
	} else if (transport_type == TRANSPORT_RAIL) {
 
		const RailtypeInfo *rti = GetRailTypeInfo(GetRailType(rampsouth));
 
		if (rti->UsesOverlay()) {
 
			SpriteID surface = GetCustomRailSprite(rti, rampsouth, RTSG_BRIDGE);
 
			SpriteID surface = GetCustomRailSprite(rti, rampsouth, RTSG_BRIDGE, TC_ON_BRIDGE);
 
			if (surface != 0) {
 
				AddSortableSpriteToDraw(surface + axis, PAL_NONE, x, y, 16, 16, 0, bridge_z, IsTransparencySet(TO_BRIDGES));
 
			}
0 comments (0 inline, 0 general)