src/elrail.cpp
changeset 10017 c0eb11a864d7
parent 9625 9f6c09b4a030
child 10108 0f63f81e09f0
equal deleted inserted replaced
10016:8bfe2fe41d86 10017:c0eb11a864d7
   367 			assert(!IsSteepSlope(tileh[TS_HOME]));
   367 			assert(!IsSteepSlope(tileh[TS_HOME]));
   368 			sss = &CatenarySpriteData[Wires[tileh_selector][t][PCPconfig]];
   368 			sss = &CatenarySpriteData[Wires[tileh_selector][t][PCPconfig]];
   369 
   369 
   370 			/*
   370 			/*
   371 			 * The "wire"-sprite position is inside the tile, i.e. 0 <= sss->?_offset < TILE_SIZE.
   371 			 * The "wire"-sprite position is inside the tile, i.e. 0 <= sss->?_offset < TILE_SIZE.
   372 			 * Therefore it is save to use GetSlopeZ() for the elevation.
   372 			 * Therefore it is safe to use GetSlopeZ() for the elevation.
   373 			 * Also note, that the result of GetSlopeZ() is very special for bridge-ramps.
   373 			 * Also note, that the result of GetSlopeZ() is very special for bridge-ramps.
   374 			 */
   374 			 */
   375 			AddSortableSpriteToDraw(sss->image, PAL_NONE, ti->x + sss->x_offset, ti->y + sss->y_offset,
   375 			AddSortableSpriteToDraw(sss->image, PAL_NONE, ti->x + sss->x_offset, ti->y + sss->y_offset,
   376 				sss->x_size, sss->y_size, sss->z_size, GetSlopeZ(ti->x + sss->x_offset, ti->y + sss->y_offset) + sss->z_offset,
   376 				sss->x_size, sss->y_size, sss->z_size, GetSlopeZ(ti->x + sss->x_offset, ti->y + sss->y_offset) + sss->z_offset,
   377 				IsTransparencySet(TO_CATENARY));
   377 				IsTransparencySet(TO_CATENARY));