Changeset - r16339:e90c1dadabf0
[Not reviewed]
master
0 27 0
alberth - 14 years ago 2010-10-30 17:51:07
alberth@openttd.org
(svn r21060) -Doc: Improved wording of comments (mostly by __ln__)
27 files changed with 46 insertions and 44 deletions:
0 comments (0 inline, 0 general)
src/ai/api/ai_types.hpp
Show inline comments
 
@@ -9,13 +9,13 @@
 

	
 
/**
 
 * @file ai_types.hpp Defines all the types of the game, like IDs of various objects.
 
 *
 
 * IDs are used to identify certain objects. They are only unique within the object type, so for example a vehicle may have VehicleID 2009,
 
 * while a station has StationID 2009 at the same time. Also IDs are assigned arbitrary, you cannot assume them to be consecutive.
 
 * Also note, that some IDs are static and never change, while others are allocated dynamically and might be
 
 * Also note that some IDs are static and never change, while others are allocated dynamically and might be
 
 * reused for other objects once they are released. So be careful, which IDs you store for which purpose and whether they stay valid all the time.
 
 *
 
 * <table>
 
 * <tr><th>type         </th><th> object                                            </th>
 
 *                           <th> acquired                                          </th>
 
 *                           <th> released                                          </th>
src/autoreplace_cmd.cpp
Show inline comments
 
@@ -152,13 +152,13 @@ static bool VerifyAutoreplaceRefitForOrd
 

	
 
	return true;
 
}
 

	
 
/**
 
 * Function to find what type of cargo to refit to when autoreplacing
 
 * @param *v Original vehicle, that is being replaced
 
 * @param *v Original vehicle that is being replaced.
 
 * @param engine_type The EngineID of the vehicle that is being replaced to
 
 * @param part_of_chain The vehicle is part of a train
 
 * @return The cargo type to replace to
 
 *    CT_NO_REFIT is returned if no refit is needed
 
 *    CT_INVALID is returned when both old and new vehicle got cargo capacity and refitting the new one to the old one's cargo type isn't possible
 
 */
src/build_vehicle_gui.cpp
Show inline comments
 
@@ -686,13 +686,13 @@ int DrawVehiclePurchaseInfo(int left, in
 
			y += FONT_HEIGHT_NORMAL;
 
		} else {
 
			y = new_y;
 
		}
 
	}
 

	
 
	/* Draw details, that applies to all types except rail wagons */
 
	/* Draw details that apply to all types except rail wagons. */
 
	if (e->type != VEH_TRAIN || e->u.rail.railveh_type != RAILVEH_WAGON) {
 
		/* Design date - Life length */
 
		SetDParam(0, ymd.year);
 
		SetDParam(1, e->GetLifeLengthInDays() / DAYS_IN_LEAP_YEAR);
 
		DrawString(left, right, y, STR_PURCHASE_INFO_DESIGNED_LIFE);
 
		y += FONT_HEIGHT_NORMAL;
src/depot_gui.cpp
Show inline comments
 
@@ -353,13 +353,13 @@ struct DepotWindow : Window {
 
				}
 
			}
 
		}
 

	
 
		maxval = min(this->vehicle_list.Length() + this->wagon_list.Length(), (this->vscroll->GetPosition() * boxes_in_each_row) + (rows_in_display * boxes_in_each_row));
 

	
 
		/* draw the train wagons, that do not have an engine in front */
 
		/* Draw the train wagons without an engine in front. */
 
		for (; num < maxval; num++, y += this->resize.step_height) {
 
			const Vehicle *v = this->wagon_list[num - this->vehicle_list.Length()];
 
			this->DrawVehicleInDepot(v, r.left, r.right, y);
 
		}
 
	}
 

	
 
@@ -534,15 +534,17 @@ struct DepotWindow : Window {
 
				break;
 

	
 
			default: NOT_REACHED();
 
		}
 
	}
 

	
 
	/* Function to set up vehicle specific widgets (mainly sprites and strings).
 
	 * Only use this if it's the same widget, that's used for more than one vehicle type and it needs different text/sprites
 
	 * Vehicle specific text/sprites, that's in a widget, that's only shown for one vehicle type (like sell whole train) is set in the nested widget array
 
	/**
 
	 * Function to set up vehicle specific widgets (mainly sprites and strings).
 
	 * Only use this function to if the widget is used for several vehicle types and each has
 
	 * different text/sprites. If the widget is only used for a single vehicle type, or the same
 
	 * text/sprites are used every time, use the nested widget array to initialize the widget.
 
	 */
 
	void SetupWidgetData(VehicleType type)
 
	{
 
		this->GetWidget<NWidgetCore>(DEPOT_WIDGET_STOP_ALL)->tool_tip     = STR_DEPOT_MASS_STOP_DEPOT_TRAIN_TOOLTIP + type;
 
		this->GetWidget<NWidgetCore>(DEPOT_WIDGET_START_ALL)->tool_tip    = STR_DEPOT_MASS_START_DEPOT_TRAIN_TOOLTIP + type;
 
		this->GetWidget<NWidgetCore>(DEPOT_WIDGET_SELL)->tool_tip         = STR_DEPOT_TRAIN_SELL_TOOLTIP + type;
src/economy_type.h
Show inline comments
 
@@ -172,25 +172,25 @@ enum PriceCategory {
 
/**
 
 * Describes properties of price bases.
 
 */
 
struct PriceBaseSpec {
 
	Money start_price;      ///< Default value at game start, before adding multipliers.
 
	PriceCategory category; ///< Price is affected by certain difficulty settings.
 
	uint grf_feature;       ///< GRF Feature, that decides whether price multipliers apply locally or globally. GSF_END if none.
 
	uint grf_feature;       ///< GRF Feature that decides whether price multipliers apply locally or globally, #GSF_END if none.
 
	Price fallback_price;   ///< Fallback price multiplier for new prices but old grfs.
 
};
 

	
 
/** The "steps" in loan size, in British Pounds! */
 
static const int LOAN_INTERVAL = 10000;
 

	
 
/**
 
 * Maximum inflation (including fractional part) without causing overflows in int64 price computations.
 
 * This allows for 32 bit base prices (21 are currently needed).
 
 * Considering the sign bit and 16 fractional bits, there are 15 bits left.
 
 * 170 years of 4% inflation result in a inflation of about 822, so 10 bits are actually enough.
 
 * Note, that NewGRF multipliers share the 16 fractional bits.
 
 * Note that NewGRF multipliers share the 16 fractional bits.
 
 * @see MAX_PRICE_MODIFIER
 
 */
 
static const uint64 MAX_INFLATION = (1ull << (63 - 32)) - 1;
 

	
 
/**
 
 * Maximum NewGRF price modifiers.
src/elrail.cpp
Show inline comments
 
@@ -462,13 +462,13 @@ static void DrawCatenaryRailway(const Ti
 
		assert(!IsSteepSlope(tileh[TS_HOME]));
 
		sss = &CatenarySpriteData[Wires[tileh_selector][t][PCPconfig]];
 

	
 
		/*
 
		 * The "wire"-sprite position is inside the tile, i.e. 0 <= sss->?_offset < TILE_SIZE.
 
		 * Therefore it is safe to use GetSlopeZ() for the elevation.
 
		 * Also note, that the result of GetSlopeZ() is very special for bridge-ramps.
 
		 * Also note that the result of GetSlopeZ() is very special for bridge-ramps.
 
		 */
 
		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, GetSlopeZ(ti->x + sss->x_offset, ti->y + sss->y_offset) + sss->z_offset,
 
			IsTransparencySet(TO_CATENARY));
 
	}
 
}
src/fileio.cpp
Show inline comments
 
@@ -701,13 +701,13 @@ bool TarScanner::AddFile(const char *fil
 
							if (dest[0] == '\0') {
 
								DEBUG(misc, 1, "Ignoring link pointing outside of data directory: %s -> %s", name, link);
 
								break;
 
							}
 

	
 
							/* Truncate 'dest' after last PATHSEPCHAR.
 
							 * This assumes, that the truncated part is a real directory and not a link */
 
							 * This assumes that the truncated part is a real directory and not a link. */
 
							destpos = strrchr(dest, PATHSEPCHAR);
 
							if (destpos == NULL) destpos = dest;
 
						} else {
 
							/* Append at end of 'dest' */
 
							if (destpos != dest) *(destpos++) = PATHSEPCHAR;
 
							strncpy(destpos, pos, next - pos); // Safe as we do '\0'-termination ourselves
src/gfx.cpp
Show inline comments
 
@@ -102,13 +102,13 @@ static ReusableBuffer<uint8> _cursor_bac
 
 * This rectangle defines the area which should be repaint by the video driver.
 
 *
 
 * @ingroup dirty
 
 */
 
static Rect _invalid_rect;
 
static const byte *_colour_remap_ptr;
 
static byte _string_colourremap[3]; ///< Recoloursprite for stringdrawing. The grf loader ensures, that ST_FONT sprites only use colours 0 to 2.
 
static byte _string_colourremap[3]; ///< Recoloursprite for stringdrawing. The grf loader ensures that #ST_FONT sprites only use colours 0 to 2.
 

	
 
static const uint DIRTY_BLOCK_HEIGHT   = 8;
 
static const uint DIRTY_BLOCK_WIDTH    = 64;
 

	
 
static uint _dirty_bytes_per_line = 0;
 
static byte *_dirty_blocks = NULL;
src/industry_gui.cpp
Show inline comments
 
@@ -2016,13 +2016,13 @@ next_cargo: ;
 
 * - Height of a #CFT_CARGO field is equally high as the height of the #CFT_INDUSTRY.
 
 * - A field at the top (#CFT_HEADER or #CFT_SMALL_EMPTY) match the width of the fields below them (#CFT_INDUSTRY respectively
 
 *   #CFT_CARGO), the height should be sufficient to display the header text.
 
 *
 
 * When displaying the cargoes around an industry type, five columns are needed (supplying industries, accepted cargoes, the industry,
 
 * produced cargoes, customer industries). Displaying the industries around a cargo needs three columns (supplying industries, the cargo,
 
 * customer industries). The remaining two columns are set to #CFT_EMPTY, that has a width equal to the average of a cargo and an industry column.
 
 * customer industries). The remaining two columns are set to #CFT_EMPTY with a width equal to the average of a cargo and an industry column.
 
 */
 
struct IndustryCargoesWindow : public Window {
 
	static const int HOR_TEXT_PADDING, VERT_TEXT_PADDING;
 

	
 
	typedef SmallVector<CargoesRow, 4> Fields;
 

	
src/landscape.cpp
Show inline comments
 
@@ -75,13 +75,13 @@ extern const byte _slope_to_sprite_offse
 
};
 

	
 
/**
 
 * Description of the snow line throughout the year.
 
 *
 
 * If it is \c NULL, a static snowline height is used, as set by \c _settings_game.game_creation.snow_line.
 
 * Otherwise it points to a table loaded from a newGRF file, that describes the variable snowline
 
 * Otherwise it points to a table loaded from a newGRF file that describes the variable snowline.
 
 * @ingroup SnowLineGroup
 
 * @see GetSnowLine() GameCreationSettings
 
 */
 
static SnowLine *_snow_line = NULL;
 

	
 
/**
src/misc/blob.hpp
Show inline comments
 
@@ -38,16 +38,16 @@
 
 *     When memory block is allocated, the sizeof(BlobHeader) it added to it.
 
 *  5. Benefits of this layout:
 
 *     - items are accessed in the simplest possible way - just dereferencing the pointer,
 
 *       which is good for performance (assuming that data are accessed most often).
 
 *     - sizeof(blob) is the same as the size of any other pointer
 
 *  6. Drawbacks of this layout:
 
 *     - the fact, that pointer to the alocated block is adjusted by sizeof(BlobHeader) before
 
 *     - the fact that a pointer to the allocated block is adjusted by sizeof(BlobHeader) before
 
 *       it is stored can lead to several confusions:
 
 *         - it is not common pattern so the implementation code is bit harder to read
 
 *         - valgrind can generate warning that allocated block is lost (not accessible)
 
 *         - it is not a common pattern so the implementation code is bit harder to read.
 
 *         - valgrind may generate a warning that the allocated block is lost (not accessible).
 
 */
 
class ByteBlob {
 
protected:
 
	/** header of the allocated memory block */
 
	struct BlobHeader {
 
		size_t items;     ///< actual blob size in bytes
src/newgrf_house.cpp
Show inline comments
 
@@ -135,13 +135,13 @@ uint32 GetNearbyTileInformation(byte par
 
	tile = GetNearbyTile(parameter, tile);
 
	return GetNearbyTileInformation(tile);
 
}
 

	
 
/** Structure with user-data for SearchNearbyHouseXXX - functions */
 
typedef struct {
 
	const HouseSpec *hs;  ///< Specs of the house, that started the search
 
	const HouseSpec *hs;  ///< Specs of the house that started the search.
 
	TileIndex north_tile; ///< Northern tile of the house.
 
} SearchNearbyHouseData;
 

	
 
/**
 
 * Callback function to search a house by its HouseID
 
 * @param tile TileIndex to be examined
src/pathfinder/yapf/nodelist.hpp
Show inline comments
 
@@ -77,13 +77,13 @@ public:
 
	FORCEINLINE Titem_ *CreateNewNode()
 
	{
 
		if (m_new_node == NULL) m_new_node = m_arr.AppendC();
 
		return m_new_node;
 
	}
 

	
 
	/** notify the nodelist, that we don't want to discard the given node */
 
	/** Notify the nodelist that we don't want to discard the given node. */
 
	FORCEINLINE void FoundBestNode(Titem_& item)
 
	{
 
		/* for now it is enough to invalidate m_new_node if it is our given node */
 
		if (&item == m_new_node) {
 
			m_new_node = NULL;
 
		}
src/rail_cmd.cpp
Show inline comments
 
@@ -1631,13 +1631,13 @@ static CommandCost ClearTile_Track(TileI
 
	}
 

	
 
	switch (GetRailTileType(tile)) {
 
		case RAIL_TILE_SIGNALS:
 
		case RAIL_TILE_NORMAL: {
 
			Slope tileh = GetTileSlope(tile, NULL);
 
			/* Is there flat water on the lower halftile, that gets cleared expensively? */
 
			/* Is there flat water on the lower halftile that gets cleared expensively? */
 
			bool water_ground = (GetRailGroundType(tile) == RAIL_GROUND_WATER && IsSlopeWithOneCornerRaised(tileh));
 

	
 
			TrackBits tracks = GetTrackBits(tile);
 
			while (tracks != TRACK_BIT_NONE) {
 
				Track track = RemoveFirstTrack(&tracks);
 
				CommandCost ret = DoCommand(tile, 0, track, flags, CMD_REMOVE_SINGLE_RAIL);
 
@@ -2827,13 +2827,13 @@ static CommandCost TestAutoslopeOnRailTi
 
static CommandCost TerraformTile_Track(TileIndex tile, DoCommandFlag flags, uint z_new, Slope tileh_new)
 
{
 
	uint z_old;
 
	Slope tileh_old = GetTileSlope(tile, &z_old);
 
	if (IsPlainRail(tile)) {
 
		TrackBits rail_bits = GetTrackBits(tile);
 
		/* Is there flat water on the lower halftile, that must be cleared expensively? */
 
		/* Is there flat water on the lower halftile that must be cleared expensively? */
 
		bool was_water = (GetRailGroundType(tile) == RAIL_GROUND_WATER && IsSlopeWithOneCornerRaised(tileh_old));
 

	
 
		/* First test autoslope. However if it succeeds we still have to test the rest, because non-autoslope terraforming is cheaper. */
 
		CommandCost autoslope_result = TestAutoslopeOnRailTile(tile, flags, z_old, tileh_old, z_new, tileh_new, rail_bits);
 

	
 
		/* When there is only a single horizontal/vertical track, one corner can be terraformed. */
src/slope_func.h
Show inline comments
 
@@ -236,13 +236,13 @@ static inline DiagDirection GetInclinedS
 
		case SLOPE_NW: return DIAGDIR_NW;
 
		default: return INVALID_DIAGDIR;
 
	}
 
}
 

	
 
/**
 
 * Returns the slope, that is inclined in a specific direction.
 
 * Returns the slope that is inclined in a specific direction.
 
 *
 
 * @param dir A #DiagDirection
 
 * @return The #Slope that goes up in direction dir.
 
 */
 
static inline Slope InclinedSlope(DiagDirection dir)
 
{
src/station_cmd.cpp
Show inline comments
 
@@ -2136,13 +2136,13 @@ CommandCost CmdBuildAirport(TileIndex ti
 
		return_cmd_error(STR_ERROR_STATION_TOO_SPREAD_OUT);
 
	}
 

	
 
	CommandCost cost = CheckFlatLand(TileArea(tile, w, h), flags);
 
	if (cost.Failed()) return cost;
 

	
 
	/* Go get the final noise level, that is base noise minus factor from distance to town center */
 
	/* The noise level is the noise from the airport and reduce it to account for the distance to the town center. */
 
	Town *nearest = AirportGetNearestTown(as, tile);
 
	uint newnoise_level = GetAirportNoiseLevelForTown(as, nearest->xy, tile);
 

	
 
	/* Check if local auth would allow a new airport */
 
	StringID authority_refuse_message = STR_NULL;
 

	
 
@@ -2301,13 +2301,13 @@ static CommandCost RemoveAirport(TileInd
 
		for (uint i = 0; i < st->airport.GetNumHangars(); ++i) {
 
			DeleteWindowById(
 
				WC_VEHICLE_DEPOT, st->airport.GetHangarTile(i)
 
			);
 
		}
 

	
 
		/* Go get the final noise level, that is base noise minus factor from distance to town center.
 
		/* The noise level is the noise from the airport and reduce it to account for the distance to the town center.
 
		 * And as for construction, always remove it, even if the setting is not set, in order to avoid the
 
		 * need of recalculation */
 
		Town *nearest = AirportGetNearestTown(as, tile);
 
		nearest->noise_reached -= GetAirportNoiseLevelForTown(as, nearest->xy, tile);
 

	
 
		st->rect.AfterRemoveRect(st, st->airport);
src/table/sprites.h
Show inline comments
 
@@ -265,13 +265,13 @@ static const SpriteID SPR_ONEWAY_BASE = 
 
static const uint16 ONEWAY_SPRITE_COUNT = 6;
 

	
 
/* Flags sprites (in same order as enum NetworkLanguage) */
 
static const SpriteID SPR_FLAGS_BASE = SPR_ONEWAY_BASE + ONEWAY_SPRITE_COUNT;
 
static const uint16 FLAGS_SPRITE_COUNT = 36;
 

	
 
/* Not really a sprite, but an empty bounding box. Used to construct bounding boxes, that help sorting the sprites, but do not have a sprite associated. */
 
/* Not really a sprite, but an empty bounding box. Used to construct bounding boxes that help sorting the sprites, but do not have a sprite associated. */
 
static const SpriteID SPR_EMPTY_BOUNDING_BOX = SPR_FLAGS_BASE + FLAGS_SPRITE_COUNT;
 
static const uint16 EMPTY_BOUNDING_BOX_SPRITE_COUNT = 1;
 

	
 
/* From where can we start putting NewGRFs? */
 
static const SpriteID SPR_NEWGRFS_BASE = SPR_EMPTY_BOUNDING_BOX + EMPTY_BOUNDING_BOX_SPRITE_COUNT;
 

	
src/terraform_cmd.cpp
Show inline comments
 
@@ -175,13 +175,13 @@ static CommandCost TerraformTileHeight(T
 
		if (x == 1) x = 0;
 
		if (y == 1) y = 0;
 
		_terraform_err_tile = TileXY(x, y);
 
		return_cmd_error(STR_ERROR_TOO_CLOSE_TO_EDGE_OF_MAP);
 
	}
 

	
 
	/* Mark incident tiles, that are involved in the terraforming */
 
	/* Mark incident tiles that are involved in the terraforming. */
 
	TerraformAddDirtyTileAround(ts, tile);
 

	
 
	/* Store the height modification */
 
	TerraformSetHeightOfTile(ts, tile, height);
 

	
 
	CommandCost total_cost(EXPENSES_CONSTRUCTION);
src/tgp.cpp
Show inline comments
 
@@ -19,14 +19,14 @@
 
#include "landscape_type.h"
 

	
 
/*
 
 *
 
 * Quickie guide to Perlin Noise
 
 * Perlin noise is a predictable pseudo random number sequence. By generating
 
 * it in 2 dimensions, it becomes a useful random map, that for a given seed
 
 * and starting X & Y is entirely predictable. On the face of it, that may not
 
 * it in 2 dimensions, it becomes a useful random map that, for a given seed
 
 * and starting X & Y, is entirely predictable. On the face of it, that may not
 
 * be useful. However, it means that if you want to replay a map in a different
 
 * terrain, or just vary the sea level, you just re-run the generator with the
 
 * same seed. The seed is an int32, and is randomised on each run of New Game.
 
 * The Scenario Generator does not randomise the value, so that you can
 
 * experiment with one terrain until you are happy, or click "Random" for a new
 
 * random seed.
src/track_func.h
Show inline comments
 
@@ -59,13 +59,13 @@ static inline TrackBits TrackToTrackBits
 
static inline TrackBits AxisToTrackBits(Axis a)
 
{
 
	return TrackToTrackBits(AxisToTrack(a));
 
}
 

	
 
/**
 
 * Returns a single horizontal/vertical trackbit, that is in a specific tile corner.
 
 * Returns a single horizontal/vertical trackbit that is in a specific tile corner.
 
 *
 
 * @param corner The corner of a tile.
 
 * @return The TrackBits of the track in the corner.
 
 */
 
static inline TrackBits CornerToTrackBits(Corner corner)
 
{
src/train.h
Show inline comments
 
@@ -159,13 +159,13 @@ struct Train : public GroundVehicle<Trai
 
	 * This is an enum to tell what bit to access as it is a bitmask
 
	 */
 
	enum TrainSubtype {
 
		TS_FRONT             = 0, ///< Leading engine of a train
 
		TS_ARTICULATED_PART  = 1, ///< Articulated part of an engine
 
		TS_WAGON             = 2, ///< Wagon
 
		TS_ENGINE            = 3, ///< Engine, that can be front engine, but might be placed behind another engine
 
		TS_ENGINE            = 3, ///< Engine that can be front engine, but might be placed behind another engine.
 
		TS_FREE_WAGON        = 4, ///< First in a wagon chain (in depot)
 
		TS_MULTIHEADED       = 5, ///< Engine is multiheaded
 
	};
 

	
 
	/**
 
	 * Set front engine state
src/train_cmd.cpp
Show inline comments
 
@@ -1244,25 +1244,25 @@ CommandCost CmdMoveRailVehicle(TileIndex
 
		/* First normalise the sub types of the chains. */
 
		NormaliseSubtypes(src_head);
 
		NormaliseSubtypes(dst_head);
 

	
 
		/* There are 14 different cases:
 
		 *  1) front engine gets moved to a new train, it stays a front engine.
 
		 *     a) the 'next' part is a wagon, that becomes a free wagon chain.
 
		 *     b) the 'next' part is an engine, that becomes a front engine.
 
		 *     a) the 'next' part is a wagon that becomes a free wagon chain.
 
		 *     b) the 'next' part is an engine that becomes a front engine.
 
		 *     c) there is no 'next' part, nothing else happens
 
		 *  2) front engine gets moved to another train, it is not a front engine anymore
 
		 *     a) the 'next' part is a wagon, that becomes a free wagon chain.
 
		 *     b) the 'next' part is an engine, that becomes a front engine.
 
		 *     a) the 'next' part is a wagon that becomes a free wagon chain.
 
		 *     b) the 'next' part is an engine that becomes a front engine.
 
		 *     c) there is no 'next' part, nothing else happens
 
		 *  3) front engine gets moved to later in the current train, it is not an engine anymore.
 
		 *     a) the 'next' part is a wagon, that becomes a free wagon chain.
 
		 *     b) the 'next' part is an engine, that becomes a front engine.
 
		 *     a) the 'next' part is a wagon that becomes a free wagon chain.
 
		 *     b) the 'next' part is an engine that becomes a front engine.
 
		 *  4) free wagon gets moved
 
		 *     a) the 'next' part is a wagon, that becomes a free wagon chain.
 
		 *     b) the 'next' part is an engine, that becomes a front engine.
 
		 *     a) the 'next' part is a wagon that becomes a free wagon chain.
 
		 *     b) the 'next' part is an engine that becomes a front engine.
 
		 *     c) there is no 'next' part, nothing else happens
 
		 *  5) non front engine gets moved and becomes a new train, nothing else happens
 
		 *  6) non front engine gets moved within a train / to another train, nothing hapens
 
		 *  7) wagon gets moved, nothing happens
 
		 */
 
		if (src == original_src_head && src->IsEngine() && !src->IsFrontEngine()) {
src/tunnelbridge_cmd.cpp
Show inline comments
 
@@ -1057,13 +1057,13 @@ static void DrawTile_TunnelBridge(TileIn
 
		}
 

	
 
		AddSortableSpriteToDraw(image + 1, PAL_NONE, ti->x + TILE_SIZE - 1, ti->y + TILE_SIZE - 1, BB_data[0], BB_data[1], TILE_HEIGHT, ti->z, false, BB_data[2], BB_data[3], BB_Z_SEPARATOR);
 

	
 
		if (catenary) EndSpriteCombine();
 

	
 
		/* Add helper BB for sprite sorting, that separate the tunnel from things beside of it */
 
		/* Add helper BB for sprite sorting that separates the tunnel from things beside of it. */
 
		AddSortableSpriteToDraw(SPR_EMPTY_BOUNDING_BOX, PAL_NONE, ti->x,              ti->y,              BB_data[6], BB_data[7], TILE_HEIGHT, ti->z);
 
		AddSortableSpriteToDraw(SPR_EMPTY_BOUNDING_BOX, PAL_NONE, ti->x + BB_data[4], ti->y + BB_data[5], BB_data[6], BB_data[7], TILE_HEIGHT, ti->z);
 

	
 
		DrawBridgeMiddle(ti);
 
	} else { // IsBridge(ti->tile)
 
		const PalSpriteID *psid;
 
@@ -1246,13 +1246,13 @@ void DrawBridgeMiddle(const TileInfo *ti
 

	
 
	int x = ti->x;
 
	int y = ti->y;
 
	uint bridge_z = GetBridgeHeight(rampsouth);
 
	uint z = bridge_z - BRIDGE_Z_START;
 

	
 
	/* Add a bounding box, that separates the bridge from things below it. */
 
	/* Add a bounding box that separates the bridge from things below it. */
 
	AddSortableSpriteToDraw(SPR_EMPTY_BOUNDING_BOX, PAL_NONE, x, y, 16, 16, 1, bridge_z - TILE_HEIGHT + BB_Z_SEPARATOR);
 

	
 
	/* Draw Trambits as SpriteCombine */
 
	if (transport_type == TRANSPORT_ROAD || transport_type == TRANSPORT_RAIL) StartSpriteCombine();
 

	
 
	/* Draw floor and far part of bridge*/
src/vehicle.cpp
Show inline comments
 
@@ -703,13 +703,13 @@ Vehicle::~Vehicle()
 
	UpdateVehiclePosHash(this, INVALID_COORD, 0);
 
	DeleteVehicleNews(this->index, INVALID_STRING_ID);
 
	DeleteNewGRFInspectWindow(GetGrfSpecFeature(this->type), this->index);
 
}
 

	
 
/**
 
 * Adds a vehicle to the list of vehicles, that visited a depot this tick
 
 * Adds a vehicle to the list of vehicles that visited a depot this tick
 
 * @param *v vehicle to add
 
 */
 
void VehicleEnteredDepotThisTick(Vehicle *v)
 
{
 
	/* Vehicle should stop in the depot if it was in 'stopping' state */
 
	_vehicles_to_autoreplace[v] = !(v->vehstatus & VS_STOPPED);
src/vehicle_cmd.cpp
Show inline comments
 
@@ -633,13 +633,13 @@ CommandCost CmdCloneVehicle(TileIndex ti
 
	Vehicle *w = NULL;
 
	Vehicle *w_front = NULL;
 
	Vehicle *w_rear = NULL;
 

	
 
	/*
 
	 * v_front is the front engine in the original vehicle
 
	 * v is the car/vehicle of the original vehicle, that is currently being copied
 
	 * v is the car/vehicle of the original vehicle that is currently being copied
 
	 * w_front is the front engine of the cloned vehicle
 
	 * w is the car/vehicle currently being cloned
 
	 * w_rear is the rear end of the cloned train. It's used to add more cars and is only used by trains
 
	 */
 

	
 
	CommandCost ret = CheckOwnership(v->owner);
src/viewport.cpp
Show inline comments
 
@@ -818,13 +818,13 @@ static void AddStringToDraw(int x, int y
 
 * @param ti TileInfo Tile that is being drawn
 
 * @param z_offset Z offset relative to the groundsprite. Only used for the sprite position, not for sprite sorting.
 
 * @param foundation_part Foundation part the sprite belongs to.
 
 */
 
static void DrawSelectionSprite(SpriteID image, PaletteID pal, const TileInfo *ti, int z_offset, FoundationPart foundation_part)
 
{
 
	/* FIXME: This is not totally valid for some autorail highlights, that extent over the edges of the tile. */
 
	/* FIXME: This is not totally valid for some autorail highlights that extend over the edges of the tile. */
 
	if (_vd.foundation[foundation_part] == -1) {
 
		/* draw on real ground */
 
		AddTileSpriteToDraw(image, pal, ti->x, ti->y, ti->z + z_offset);
 
	} else {
 
		/* draw on top of foundation */
 
		AddChildSpriteToFoundation(image, pal, NULL, foundation_part, 0, -z_offset);
src/window.cpp
Show inline comments
 
@@ -761,13 +761,13 @@ restart_search:
 
		if (w->owner == id) {
 
			delete w;
 
			goto restart_search;
 
		}
 
	}
 

	
 
	/* Also delete the company specific windows, that don't have a company-colour */
 
	/* Also delete the company specific windows that don't have a company-colour. */
 
	DeleteWindowById(WC_BUY_COMPANY, id);
 
}
 

	
 
/**
 
 * Change the owner of all the windows one company can take over from another
 
 * company in the case of a company merger. Do not change ownership of windows
0 comments (0 inline, 0 general)