Changeset - r19604:b2796fd9d433
[Not reviewed]
master
0 8 0
alberth - 12 years ago 2012-09-21 09:47:21
alberth@openttd.org
(svn r24535) -Doc: Two additions, lots of small spelling fixes, and some Doxygen improvements.
8 files changed with 33 insertions and 27 deletions:
0 comments (0 inline, 0 general)
src/engine.cpp
Show inline comments
 
@@ -900,6 +900,7 @@ static void NewVehicleAvailable(Engine *
 
	if (e->type == VEH_SHIP) InvalidateWindowData(WC_BUILD_TOOLBAR, TRANSPORT_WATER);
 
}
 

	
 
/** Monthly update of the availability, reliability, and preview offers of the engines. */
 
void EnginesMonthlyLoop()
 
{
 
	if (_cur_year < _year_engine_aging_stops) {
 
@@ -932,6 +933,11 @@ void EnginesMonthlyLoop()
 
	}
 
}
 

	
 
/**
 
 * Is \a name still free as name for an engine?
 
 * @param name New name of an engine.
 
 * @return \c false if the name is being used already, else \c true.
 
 */
 
static bool IsUniqueEngineName(const char *name)
 
{
 
	const Engine *e;
src/newgrf.cpp
Show inline comments
 
@@ -58,7 +58,7 @@
 
 *
 
 * Contains portions of documentation by TTDPatch team.
 
 * Thanks especially to Josef Drexler for the documentation as well as a lot
 
 * of help at #tycoon. Also thanks to Michael Blunck for is GRF files which
 
 * of help at #tycoon. Also thanks to Michael Blunck for his GRF files which
 
 * served as subject to the initial testing of this codec. */
 

	
 
/** List of all loaded GRF files */
 
@@ -284,7 +284,7 @@ static const uint MAX_STATIONS = 256;
 

	
 
/** Temporary engine data used when loading only */
 
struct GRFTempEngineData {
 
	/** Summary state of refitability properties */
 
	/** Summary state of refittability properties */
 
	enum Refittability {
 
		UNSET    =  0,  ///< No properties assigned. Default refit masks shall be activated.
 
		EMPTY,          ///< GRF defined vehicle as not-refittable. The vehicle shall only carry the default cargo.
 
@@ -1970,7 +1970,7 @@ static ChangeInfoResult CanalChangeInfo(
 
	ChangeInfoResult ret = CIR_SUCCESS;
 

	
 
	if (id + numinfo > CF_END) {
 
		grfmsg(1, "CanalChangeInfo: Canal feature %u is invalid, max %u, ignoreing", id + numinfo, CF_END);
 
		grfmsg(1, "CanalChangeInfo: Canal feature %u is invalid, max %u, ignoring", id + numinfo, CF_END);
 
		return CIR_INVALID_ID;
 
	}
 

	
src/newgrf_industries.h
Show inline comments
 
@@ -24,7 +24,7 @@ enum IndustryTrigger {
 
	INDUSTRY_TRIGGER_CARGO_DELIVERY   = 4,
 
};
 

	
 
/** From where is callback CBID_INDUSTRY_PROBABILITY been called */
 
/** From where has callback #CBID_INDUSTRY_PROBABILITY been called */
 
enum IndustryAvailabilityCallType {
 
	IACT_MAPGENERATION,    ///< during random map generation
 
	IACT_RANDOMCREATION,   ///< during creation of random ingame industry
src/script/api/script_text.hpp
Show inline comments
 
@@ -30,7 +30,7 @@ public:
 
};
 

	
 
/**
 
 * Interal used class to create a raw text in a Text object.
 
 * Internally used class to create a raw text in a Text object.
 
 * @api -all
 
 */
 
class RawText : public Text {
 
@@ -105,7 +105,7 @@ public:
 
#else
 
	/**
 
	 * Set the parameter to a value.
 
	 * @param parameter Which parameter t oset.
 
	 * @param parameter Which parameter to set.
 
	 * @param value The value of the parameter. Has to be string, integer or an instance of the class ScriptText.
 
	 */
 
	void SetParam(int parameter, Object value);
src/station_base.h
Show inline comments
 
@@ -47,7 +47,7 @@ struct GoodsEntry {
 

	
 
	byte acceptance_pickup; ///< Status of this cargo, see #GoodsEntryStatus.
 
	byte days_since_pickup; ///< Number of days since the last pickup for this cargo (up to 255).
 
	byte rating;            ///< Station rating for this cargo.
 
	byte rating;            ///< %Station rating for this cargo.
 
	byte last_speed;        ///< Maximum speed of the last vehicle that picked up this cargo (up to 255).
 
	byte last_age;          ///< Age in years of the last vehicle that picked up this cargo.
 
	byte amount_fract;      ///< Fractional part of the amount in the cargo list
 
@@ -59,7 +59,7 @@ struct Airport : public TileArea {
 
	Airport() : TileArea(INVALID_TILE, 0, 0) {}
 

	
 
	uint64 flags;       ///< stores which blocks on the airport are taken. was 16 bit earlier on, then 32
 
	byte type;          ///< Type of this airport, @see AirportTypes.
 
	byte type;          ///< Type of this airport, @see AirportTypes
 
	byte layout;        ///< Airport layout number.
 
	Direction rotation; ///< How this airport is rotated.
 

	
src/station_cmd.cpp
Show inline comments
 
@@ -1618,7 +1618,7 @@ CommandCost RemoveRailStation(T *st, DoC
 

	
 
/**
 
 * Remove a rail station
 
 * @param tile TileIndex been queried
 
 * @param tile Tile of the station.
 
 * @param flags operation to perform
 
 * @return cost or failure of operation
 
 */
 
@@ -1639,7 +1639,7 @@ static CommandCost RemoveRailStation(Til
 

	
 
/**
 
 * Remove a rail waypoint
 
 * @param tile TileIndex been queried
 
 * @param tile Tile of the waypoint.
 
 * @param flags operation to perform
 
 * @return cost or failure of operation
 
 */
 
@@ -1655,7 +1655,7 @@ static CommandCost RemoveRailWaypoint(Ti
 

	
 

	
 
/**
 
 * @param truck_station Determines whether a stop is ROADSTOP_BUS or ROADSTOP_TRUCK
 
 * @param truck_station Determines whether a stop is #ROADSTOP_BUS or #ROADSTOP_TRUCK
 
 * @param st The Station to do the whole procedure for
 
 * @return a pointer to where to link a new RoadStop*
 
 */
 
@@ -1695,12 +1695,12 @@ static CommandCost FindJoiningRoadStop(S
 
 * @param tile Northernmost tile of the stop.
 
 * @param flags Operation to perform.
 
 * @param p1 bit 0..7: Width of the road stop.
 
 *           bit 8..15: Lenght of the road stop.
 
 *           bit 8..15: Length of the road stop.
 
 * @param p2 bit 0: 0 For bus stops, 1 for truck stops.
 
 *           bit 1: 0 For normal stops, 1 for drive-through.
 
 *           bit 2..3: The roadtypes.
 
 *           bit 5: Allow stations directly adjacent to other stations.
 
 *           bit 6..7: Entrance direction (DiagDirection).
 
 *           bit 6..7: Entrance direction (#DiagDirection).
 
 *           bit 16..31: Station ID to join (NEW_STATION if build new one).
 
 * @param text Unused.
 
 * @return The cost of this operation or an error.
 
@@ -1720,7 +1720,7 @@ CommandCost CmdBuildRoadStop(TileIndex t
 

	
 
	/* Check if the requested road stop is too big */
 
	if (width > _settings_game.station.station_spread || lenght > _settings_game.station.station_spread) return_cmd_error(STR_ERROR_STATION_TOO_SPREAD_OUT);
 
	/* Check for incorrect width / lenght. */
 
	/* Check for incorrect width / length. */
 
	if (width == 0 || lenght == 0) return CMD_ERROR;
 
	/* Check if the first tile and the last tile are valid */
 
	if (!IsValidTile(tile) || TileAddWrap(tile, width - 1, lenght - 1) == INVALID_TILE) return CMD_ERROR;
src/tgp.cpp
Show inline comments
 
@@ -53,7 +53,7 @@
 
 * using a simple (0, 0) to (X, Y), with a varying seed.
 
 *
 
 *
 
 * Other things i have had to do: mountainous wasnt mountainous enough, and
 
 * Other things i have had to do: mountainous wasn't mountainous enough, and
 
 * since we only have 0..15 heights available, I add a second generated map
 
 * (with a modified seed), onto the original. This generally raises the
 
 * terrain, which then needs scaling back down. Overall effect is a general
 
@@ -62,8 +62,8 @@
 
 * However, the values on the top of mountains are then almost guaranteed to go
 
 * too high, so large flat plateaus appeared at height 15. To counter this, I
 
 * scale all heights above 12 to proportion up to 15. It still makes the
 
 * mountains have flatish tops, rather than craggy peaks, but at least they
 
 * arent smooth as glass.
 
 * mountains have flattish tops, rather than craggy peaks, but at least they
 
 * aren't smooth as glass.
 
 *
 
 *
 
 * For a full discussion of Perlin Noise, please visit:
 
@@ -81,12 +81,12 @@
 
 *
 
 * The following implementation uses optimized algorithm that should produce
 
 * the same quality result with much less computations, but more memory accesses.
 
 * The overal speedup should be 300% to 800% depending on CPU and memory speed.
 
 * The overall speedup should be 300% to 800% depending on CPU and memory speed.
 
 *
 
 * I will try to explain it on the example below:
 
 *
 
 * Have a map of 4 x 4 tiles, our simplifiead noise generator produces only two
 
 * values -1 and +1, use 3 octaves with wave lenght 1, 2 and 4, with amplitudes
 
 * Have a map of 4 x 4 tiles, our simplified noise generator produces only two
 
 * values -1 and +1, use 3 octaves with wave length 1, 2 and 4, with amplitudes
 
 * 3, 2, 1. Original algorithm produces:
 
 *
 
 * h00 = lerp(lerp(-3, 3, 0/4), lerp(3, -3, 0/4), 0/4) + lerp(lerp(-2,  2, 0/2), lerp( 2, -2, 0/2), 0/2) + -1 = lerp(-3.0,  3.0, 0/4) + lerp(-2,  2, 0/2) + -1 = -3.0  + -2 + -1 = -6.0
 
@@ -290,7 +290,7 @@ static inline height_t RandomHeight(ampl
 
 * One interpolation and noise round
 
 *
 
 * The heights on the map are generated in an iterative process.
 
 * We start off with a frequency of 1 (log_frequency == 0), and generate heights only for corners on the most coarsly mesh
 
 * We start off with a frequency of 1 (log_frequency == 0), and generate heights only for corners on the most coarsely mesh
 
 * (i.e. only for x/y coordinates which are multiples of the minimum edge length).
 
 *
 
 * After this initial step the frequency is doubled (log_frequency incremented) each iteration to generate corners on the next finer mesh.
 
@@ -688,8 +688,8 @@ static double perlin_coast_noise_2D(cons
 
/**
 
 * This routine sculpts in from the edge a random amount, again a Perlin
 
 * sequence, to avoid the rigid flat-edge slopes that were present before. The
 
 * Perlin noise map doesnt know where we are going to slice across, and so we
 
 * often cut straight through high terrain. the smoothing routine makes it
 
 * Perlin noise map doesn't know where we are going to slice across, and so we
 
 * often cut straight through high terrain. The smoothing routine makes it
 
 * legal, gradually increasing up from the edge to the original terrain height.
 
 * By cutting parts of this away, it gives a far more irregular edge to the
 
 * map-edge. Sometimes it works beautifully with the existing sea & lakes, and
src/vehicle.cpp
Show inline comments
 
@@ -1633,10 +1633,10 @@ bool CanBuildVehicleInfrastructure(Vehic
 

	
 
/**
 
 * Determines the #LiveryScheme for a vehicle.
 
 * @param engine_type EngineID of the vehicle
 
 * @param parent_engine_type EngineID of the front vehicle. INVALID_VEHICLE if vehicle is at front itself.
 
 * @param v the vehicle. NULL if in purchase list etc.
 
 * @return livery scheme to use
 
 * @param engine_type Engine of the vehicle.
 
 * @param parent_engine_type Engine of the front vehicle, #INVALID_ENGINE if vehicle is at front itself.
 
 * @param v the vehicle, \c NULL if in purchase list etc.
 
 * @return livery scheme to use.
 
 */
 
LiveryScheme GetEngineLiveryScheme(EngineID engine_type, EngineID parent_engine_type, const Vehicle *v)
 
{
0 comments (0 inline, 0 general)