changeset 15820:59fd8293b2ee draft

(svn r20499) -Doc: Spelling fixes, and one doxygen comment addition.
author alberth <alberth@openttd.org>
date Sun, 15 Aug 2010 14:06:43 +0000
parents 6a1b604d137f
children 67634d829518
files src/ai/ai_instance.hpp src/ai/api/ai_base.hpp src/build_vehicle_gui.cpp src/genworld_gui.cpp src/industry_cmd.cpp src/industry_gui.cpp src/network/core/tcp_content.h src/network/network_content.cpp src/roadveh_cmd.cpp src/station_gui.cpp src/train_cmd.cpp src/vehicle.cpp
diffstat 12 files changed, 50 insertions(+), 41 deletions(-) [+]
line wrap: on
line diff
--- a/src/ai/ai_instance.hpp
+++ b/src/ai/ai_instance.hpp
@@ -30,7 +30,7 @@
 	{}
 
 	/**
-	 * Get the amount ot ticks the AI should be suspended.
+	 * Get the amount of ticks the AI should be suspended.
 	 * @return The amount of AI ticks to suspend the AI.
 	 */
 	int GetSuspendTime() { return time; }
@@ -172,7 +172,7 @@
 	void RegisterAPI();
 
 	/**
-	 * Load squirrel scipts to emulate an older API.
+	 * Load squirrel scripts to emulate an older API.
 	 */
 	bool LoadCompatibilityScripts(const char *api_version);
 
@@ -182,7 +182,7 @@
 	void Died();
 
 	/**
-	 * Save one object (int / string / arrray / table) to the savegame.
+	 * Save one object (int / string / array / table) to the savegame.
 	 * @param vm The virtual machine to get all the data from.
 	 * @param index The index on the squirrel stack of the element to save.
 	 * @param max_depth The maximum depth recursive arrays / tables will be stored
--- a/src/ai/api/ai_base.hpp
+++ b/src/ai/api/ai_base.hpp
@@ -36,7 +36,7 @@
 
 	/**
 	 * Get a random value.
-	 * @param unused_param This param is not used, but is needed to work with lists.
+	 * @param unused_param This parameter is not used, but is needed to work with lists.
 	 * @return A random value between 0 and MAX(uint32).
 	 */
 	static uint32 RandItem(int unused_param);
@@ -50,14 +50,14 @@
 
 	/**
 	 * Get a random value in a range.
-	 * @param unused_param This param is not used, but is needed to work with lists.
+	 * @param unused_param This parameter is not used, but is needed to work with lists.
 	 * @param max The first number this function will never return (the maximum it returns is max - 1).
 	 * @return A random value between 0 .. max - 1.
 	 */
 	static uint RandRangeItem(int unused_param, uint max);
 
 	/**
-	 * Returns approximatelly 'out' times true when called 'max' times.
+	 * Returns approximately 'out' times true when called 'max' times.
 	 *   After all, it is a random function.
 	 * @param out How many times it should return true.
 	 * @param max Out of this many times.
@@ -66,9 +66,9 @@
 	static bool Chance(uint out, uint max);
 
 	/**
-	 * Returns approximatelly 'out' times true when called 'max' times.
+	 * Returns approximately 'out' times true when called 'max' times.
 	 *   After all, it is a random function.
-	 * @param unused_param This param is not used, but is needed to work with lists.
+	 * @param unused_param This parameter is not used, but is needed to work with lists.
 	 * @param out How many times it should return true.
 	 * @param max Out of this many times.
 	 * @return True if the chance worked out.
--- a/src/build_vehicle_gui.cpp
+++ b/src/build_vehicle_gui.cpp
@@ -716,7 +716,7 @@
  * @param type Type of vehicle (VEH_*)
  * @param l The left most location of the list
  * @param r The right most location of the list
- * @param y The top most location of teh list
+ * @param y The top most location of the list
  * @param eng_list What engines to draw
  * @param min where to start in the list
  * @param max where in the list to end
--- a/src/genworld_gui.cpp
+++ b/src/genworld_gui.cpp
@@ -80,7 +80,7 @@
 	GLAND_START_DATE_TEXT,    ///< Start year
 	GLAND_START_DATE_UP,      ///< Increase start year
 
-	GLAND_SNOW_LEVEL_DOWN,    ///< Docrease snow level
+	GLAND_SNOW_LEVEL_DOWN,    ///< Decrease snow level
 	GLAND_SNOW_LEVEL_TEXT,    ///< Snow level
 	GLAND_SNOW_LEVEL_UP,      ///< Increase snow level
 
@@ -1244,7 +1244,7 @@
 	_gws.current = 0;
 	_gws.total   = 0;
 	_gws.percent = 0;
-	_gws.timer   = 0; // Forces to paint the progress window immediatelly
+	_gws.timer   = 0; // Forces to paint the progress window immediately
 }
 
 /**
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -1991,7 +1991,7 @@
 
 		if (!ind_spc->enabled || chance == 0 || ind_spc->num_table == 0) continue;
 
-		/* If there is no Callback CBID_INDUSTRY_AVAILABLE or if this one did anot failed,
+		/* If there is no Callback CBID_INDUSTRY_AVAILABLE or if this one did not fail,
 		 * and if appearing chance for this landscape is above 0, this industry can be chosen */
 		if (CheckIfCallBackAllowsAvailability(j, IACT_RANDOMCREATION)) {
 			probability_max += chance;
--- a/src/industry_gui.cpp
+++ b/src/industry_gui.cpp
@@ -331,7 +331,7 @@
 					}
 					d = maxdim(d, GetStringBoundingBox(str));
 
-					/* Draw the produced cargos, if any. Otherwhise, will print "Nothing" */
+					/* Draw the produced cargoes, if any. Otherwise, will print "Nothing". */
 					GetAllCargoSuffixes(3, CST_FUND, NULL, this->index[i], indsp, indsp->produced_cargo, cargo_suffix);
 					str = STR_INDUSTRY_VIEW_PRODUCES_CARGO;
 					p = 0;
@@ -422,7 +422,7 @@
 					y += FONT_HEIGHT_NORMAL;
 				}
 
-				/* Draw the accepted cargos, if any. Otherwhise, will print "Nothing" */
+				/* Draw the accepted cargoes, if any. Otherwise, will print "Nothing". */
 				char cargo_suffix[3][512];
 				GetAllCargoSuffixes(0, CST_FUND, NULL, this->selected_type, indsp, indsp->accepts_cargo, cargo_suffix);
 				StringID str = STR_INDUSTRY_VIEW_REQUIRES_CARGO;
@@ -438,7 +438,7 @@
 				DrawString(left, right, y, str);
 				y += FONT_HEIGHT_NORMAL;
 
-				/* Draw the produced cargos, if any. Otherwhise, will print "Nothing" */
+				/* Draw the produced cargoes, if any. Otherwise, will print "Nothing". */
 				GetAllCargoSuffixes(3, CST_FUND, NULL, this->selected_type, indsp, indsp->produced_cargo, cargo_suffix);
 				str = STR_INDUSTRY_VIEW_PRODUCES_CARGO;
 				p = 0;
@@ -1259,7 +1259,7 @@
 Listing IndustryDirectoryWindow::last_sorting = {false, 0};
 const Industry *IndustryDirectoryWindow::last_industry = NULL;
 
-/* Availible station sorting functions */
+/* Available station sorting functions. */
 GUIIndustryList::SortFunction * const IndustryDirectoryWindow::sorter_funcs[] = {
 	&IndustryNameSorter,
 	&IndustryTypeSorter,
--- a/src/network/core/tcp_content.h
+++ b/src/network/core/tcp_content.h
@@ -191,7 +191,7 @@
 	 * Handle the given packet, i.e. pass it to the right
 	 * parser receive command.
 	 * @param p the packet to handle
-	 * @return true if we should immediatelly handle further packets, false otherwise
+	 * @return true if we should immediately handle further packets, false otherwise
 	 */
 	bool HandlePacket(Packet *p);
 public:
--- a/src/network/network_content.cpp
+++ b/src/network/network_content.cpp
@@ -988,7 +988,7 @@
 
 		/* Nothing depends on us, mark the whole graph as unselected.
 		 * After that's done run over them once again to test their children
-		 * to unselect. Don't do it immediatelly because it'll do exactly what
+		 * to unselect. Don't do it immediately because it'll do exactly what
 		 * we're doing now. */
 		for (ConstContentIterator iter = parents.Begin(); iter != parents.End(); iter++) {
 			const ContentInfo *c = *iter;
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -146,6 +146,15 @@
 	return sprite;
 }
 
+/**
+ * Draw a road vehicle engine.
+ * @param left Left edge to draw within.
+ * @param right Right edge to draw within.
+ * @param preferred_x Preferred position of the engine.
+ * @param y Vertical position of the engine.
+ * @param engine Engine to draw
+ * @param pal Palette to use.
+ */
 void DrawRoadVehEngine(int left, int right, int preferred_x, int y, EngineID engine, PaletteID pal)
 {
 	SpriteID sprite = GetRoadVehIcon(engine);
@@ -1122,7 +1131,7 @@
 		if (already_reversed && prev->tile != tile) {
 			/*
 			 * The vehicle has reversed, but did not go straight back.
-			 * It immediatelly turn onto another tile. This means that
+			 * It immediately turn onto another tile. This means that
 			 * the roadstate of the previous vehicle cannot be used
 			 * as the direction we have to go with this vehicle.
 			 *
--- a/src/station_gui.cpp
+++ b/src/station_gui.cpp
@@ -1500,7 +1500,7 @@
 
 	/* Test for adjacent station or station below selection.
 	 * If adjacent-stations is disabled and we are building next to a station, do not show the selection window.
-	 * but join the other station immediatelly. */
+	 * but join the other station immediately. */
 	const T *st = FindStationsNearby<T>(ta, false);
 	return st == NULL && (_settings_game.station.adjacent_stations || _stations_nearby_list.Length() == 0);
 }
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -316,7 +316,7 @@
 			break;
 	}
 
-	/* Substract half the front vehicle length of the train so we get the real
+	/* Subtract half the front vehicle length of the train so we get the real
 	 * stop location of the train. */
 	return stop - (v->tcache.cached_veh_length + 1) / 2;
 }
@@ -717,7 +717,7 @@
 		CountArticulatedParts(eid, false);
 
 	/* Check if depot and new engine uses the same kind of tracks *
-	 * We need to see if the engine got power on the tile to avoid eletric engines in non-electric depots */
+	 * We need to see if the engine got power on the tile to avoid electric engines in non-electric depots */
 	if (!HasPowerOnRail(rvi->railtype, GetRailType(tile))) return CMD_ERROR;
 
 	/* Allow for the dual-heads and the articulated parts */
@@ -821,7 +821,7 @@
 
 bool Train::IsStoppedInDepot() const
 {
-	/* Are we stopped? Ofcourse wagons don't really care... */
+	/* Are we stopped? Of course wagons don't really care... */
 	if (this->IsFrontEngine() && !(this->vehstatus & VS_STOPPED)) return false;
 	return this->IsInDepot();
 }
@@ -948,7 +948,7 @@
 	/* We must be the first in the chain. */
 	assert(chain->Previous() == NULL);
 
-	/* Set the appropirate bits for the first in the chain. */
+	/* Set the appropriate bits for the first in the chain. */
 	if (chain->IsWagon()) {
 		chain->SetFreeWagon();
 	} else {
@@ -974,7 +974,7 @@
  */
 static CommandCost CheckNewTrain(Train *original_dst, Train *dst, Train *original_src, Train *src)
 {
-	/* Just add 'new' engines and substract the original ones.
+	/* Just add 'new' engines and subtract the original ones.
 	 * If that's less than or equal to 0 we can be sure we did
 	 * not add any engines (read: trains) along the way. */
 	if ((src          != NULL && src->IsEngine()          ? 1 : 0) +
@@ -1405,7 +1405,7 @@
 
 		if (v == first && v->IsEngine() && !sell_chain && new_head != NULL && new_head->IsFrontEngine()) {
 			/* We are selling the front engine. In this case we want to
-			 * 'give' the order, unitnumber and such to the new head. */
+			 * 'give' the order, unit number and such to the new head. */
 			new_head->orders.list = first->orders.list;
 			new_head->AddToShared(first);
 			DeleteVehicleOrders(first);
@@ -1555,7 +1555,7 @@
 		if (a->track != TRACK_BIT_WORMHOLE) VehicleEnterTile(a, a->tile, a->x_pos, a->y_pos);
 	}
 
-	/* Update train's power incase tiles were different rail type */
+	/* Update power of the train in case tiles were different rail type. */
 	v->PowerChanged();
 }
 
@@ -1713,13 +1713,13 @@
 	Train *last = v->Last(); // last vehicle to move
 	uint length = CountVehiclesInChain(v);
 
-	/* we have to make sure all wagons that leave a depot because of train reversing are moved coorectly
+	/* We have to make sure all wagons that leave a depot because of train reversing are moved correctly
 	 * they have already correct spacing, so we have to make sure they are moved how they should */
-	bool nomove = (dep == NULL); // if there is no vehicle leaving a depot, limit the number of wagons moved immediatelly
+	bool nomove = (dep == NULL); // If there is no vehicle leaving a depot, limit the number of wagons moved immediately.
 
 	while (length > 2) {
 		/* we reached vehicle (originally) in front of a depot, stop now
-		 * (we would move wagons that are alredy moved with new wagon length) */
+		 * (we would move wagons that are already moved with new wagon length). */
 		if (base == dep) break;
 
 		/* the last wagon was that one leaving a depot, so do not move it anymore */
@@ -2066,7 +2066,7 @@
 		/* No smoke in depots or tunnels */
 		if (IsRailDepotTile(v->tile) || IsTunnelTile(v->tile)) continue;
 
-		/* No sparks for electric vehicles on nonelectrified tracks */
+		/* No sparks for electric vehicles on non-electrified tracks. */
 		if (!HasPowerOnRail(v->railtype, GetTileRailType(v->tile))) continue;
 
 		if (effect_type == 0) {
@@ -2787,7 +2787,7 @@
 
 	Vehicle *other_train = NULL;
 	PBSTileInfo origin = FollowTrainReservation(v, &other_train);
-	/* The path we are driving on is alread blocked by some other train.
+	/* The path we are driving on is already blocked by some other train.
 	 * This can only happen in certain situations when mixing path and
 	 * block signals or when changing tracks and/or signals.
 	 * Exit here as doing any further reservations will probably just
@@ -2804,7 +2804,7 @@
 		return true;
 	}
 
-	/* If we are in a depot, tentativly reserve the depot. */
+	/* If we are in a depot, tentatively reserve the depot. */
 	if (v->track == TRACK_BIT_DEPOT) {
 		SetDepotReservation(v->tile, true);
 		if (_settings_client.gui.show_track_reservation) MarkTileDirtyByTile(v->tile);
@@ -3225,7 +3225,7 @@
 
 				if (bits == TRACK_BIT_NONE) goto invalid_rail;
 
-				/* Check if the new tile contrains tracks that are compatible
+				/* Check if the new tile constrains tracks that are compatible
 				 * with the current train, if not, bail out. */
 				if (!CheckCompatibleRail(v, gp.new_tile)) goto invalid_rail;
 
@@ -3309,8 +3309,8 @@
 						 * This case is active if 'prev' is already on the second next tile, when 'v' just enters the next tile.
 						 * I.e. when the tile between them has only space for a single vehicle like
 						 *  1) horizontal/vertical track tiles and
-						 *  2) some orientations of tunnelentries, where the vehicle is already inside the wormhole at 8/16 from the tileedge.
-						 *     Is also the train just reversing, the wagon inside the tunnel is 'on' the tile of the opposite tunnelentry.
+						 *  2) some orientations of tunnel entries, where the vehicle is already inside the wormhole at 8/16 from the tile edge.
+						 *     Is also the train just reversing, the wagon inside the tunnel is 'on' the tile of the opposite tunnel entry.
 						 */
 						static const TrackBits _connecting_track[DIAGDIR_END][DIAGDIR_END] = {
 							{TRACK_BIT_X,     TRACK_BIT_LOWER, TRACK_BIT_NONE,  TRACK_BIT_LEFT },
@@ -3382,7 +3382,7 @@
 				if (v->IsFrontEngine()) {
 					v->wait_counter = 0;
 
-					/* If we are approching a crossing that is reserved, play the sound now. */
+					/* If we are approaching a crossing that is reserved, play the sound now. */
 					TileIndex crossing = TrainApproachingCrossingTile(v);
 					if (crossing != INVALID_TILE && HasCrossingReservation(crossing)) SndPlayTileFx(SND_0E_LEVEL_CROSSING, crossing);
 
@@ -3514,7 +3514,7 @@
 
 	/* Go to the last wagon and delete the link pointing there
 	 * *u is then the one-before-last wagon, and *v the last
-	 * one which will physicially be removed */
+	 * one which will physically be removed */
 	Train *u = v;
 	for (; v->Next() != NULL; v = v->Next()) u = v;
 	u->SetNext(NULL);
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -136,7 +136,7 @@
 		/* Is there anything to refit? */
 		if (union_mask != 0) {
 			CargoID cargo_type;
-			/* We cannot refit to mixed cargos in an automated way */
+			/* We cannot refit to mixed cargoes in an automated way */
 			if (IsArticulatedVehicleCarryingDifferentCargos(v, &cargo_type)) continue;
 
 			/* Did the old vehicle carry anything? */
@@ -569,7 +569,7 @@
 
 /**
  * List of vehicles that should check for autoreplace this tick.
- * Mapping of vehicle -> leave depot immediatelly after autoreplace.
+ * Mapping of vehicle -> leave depot immediately after autoreplace.
  */
 typedef SmallMap<Vehicle *, bool, 4> AutoreplaceMap;
 static AutoreplaceMap _vehicles_to_autoreplace;
@@ -1416,7 +1416,7 @@
 			default: NOT_REACHED();
 			case VEH_TRAIN: {
 				if (v != NULL && parent_engine_type != INVALID_ENGINE && (UsesWagonOverride(v) || (Train::From(v)->IsArticulatedPart() && e->u.rail.railveh_type != RAILVEH_WAGON))) {
-					/* Wagonoverrides use the coloir scheme of the front engine.
+					/* Wagonoverrides use the colour scheme of the front engine.
 					 * Articulated parts use the colour scheme of the first part. (Not supported for articulated wagons) */
 					engine_type = parent_engine_type;
 					e = Engine::Get(engine_type);