Changeset - r6483:d2923d9c6631
[Not reviewed]
master
0 9 0
belugas - 18 years ago 2007-04-17 21:09:38
belugas@openttd.org
(svn r9664) -Documentation: Doxygen corrections,errors and omissions
9 files changed with 78 insertions and 14 deletions:
0 comments (0 inline, 0 general)
src/os2.cpp
Show inline comments
 
@@ -166,13 +166,13 @@ int CDECL main(int argc, char* argv[])
 
}
 

	
 
/**
 
 * Insert a chunk of text from the clipboard onto the textbuffer. Get TEXT clipboard
 
 * and append this up to the maximum length (either absolute or screenlength). If maxlength
 
 * is zero, we don't care about the screenlength but only about the physical length of the string
 
 * @param tb @Textbuf type to be changed
 
 * @param tb Textbuf type to be changed
 
 * @return Return true on successfull change of Textbuf, or false otherwise
 
 */
 
bool InsertTextBufferClipboard(Textbuf *tb)
 
{
 
/* XXX -- Currently no clipboard support implemented with GCC */
 
#ifndef __INNOTEK_LIBC__
src/players.cpp
Show inline comments
 
@@ -619,12 +619,13 @@ static void DeletePlayerStuff(PlayerID p
 
	p->name_1 = 0;
 
	p->president_name_1 = 0;
 
}
 

	
 
/** Change engine renewal parameters
 
 * @param tile unused
 
 * @param flags operation to perform
 
 * @param p1 bits 0-3 command
 
 * - p1 = 0 - change auto renew bool
 
 * - p1 = 1 - change auto renew months
 
 * - p1 = 2 - change auto renew money
 
 * - p1 = 3 - change auto renew array
 
 * - p1 = 4 - change bool, months & money all together
 
@@ -752,12 +753,13 @@ int32 CmdSetAutoReplace(TileIndex tile, 
 
	}
 
	return 0;
 
}
 

	
 
/** Control the players: add, delete, etc.
 
 * @param tile unused
 
 * @param flags operation to perform
 
 * @param p1 various functionality
 
 * - p1 = 0 - create a new player, Which player (network) it will be is in p2
 
 * - p1 = 1 - create a new AI player
 
 * - p1 = 2 - delete a player. Player is identified by p2
 
 * - p1 = 3 - merge two companies together. Player to merge #1 with player #2. Identified by p2
 
 * @param p2 various functionality, dictated by p1
src/rail_cmd.cpp
Show inline comments
 
@@ -227,12 +227,13 @@ static uint32 CheckRailSlope(Slope tileh
 

	
 
/* Validate functions for rail building */
 
static inline bool ValParamTrackOrientation(Track track) {return IsValidTrack(track);}
 

	
 
/** Build a single piece of rail
 
 * @param tile tile  to build on
 
 * @param flags operation to perform
 
 * @param p1 railtype of being built piece (normal, mono, maglev)
 
 * @param p2 rail track to build
 
 */
 
int32 CmdBuildSingleRail(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
 
{
 
	Slope tileh;
 
@@ -329,12 +330,13 @@ int32 CmdBuildSingleRail(TileIndex tile,
 

	
 
	return cost + _price.build_rail;
 
}
 

	
 
/** Remove a single piece of track
 
 * @param tile tile to remove track from
 
 * @param flags operation to perform
 
 * @param p1 unused
 
 * @param p2 rail orientation
 
 */
 
int32 CmdRemoveSingleRail(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
 
{
 
	Track track = (Track)p2;
 
@@ -474,12 +476,13 @@ static int32 ValidateAutoDrag(Trackdir *
 

	
 
	return 0;
 
}
 

	
 
/** Build a stretch of railroad tracks.
 
 * @param tile start tile of drag
 
 * @param flags operation to perform
 
 * @param p1 end tile of drag
 
 * @param p2 various bitstuffed elements
 
 * - p2 = (bit 0-3) - railroad type normal/maglev (0 = normal, 1 = mono, 2 = maglev)
 
 * - p2 = (bit 4-6) - track-orientation, valid values: 0-5 (Track enum)
 
 * - p2 = (bit 7)   - 0 = build, 1 = remove tracks
 
 */
 
@@ -523,30 +526,45 @@ static int32 CmdRailTrackHelper(TileInde
 

	
 
	return (total_cost == 0) ? CMD_ERROR : total_cost;
 
}
 

	
 
/** Build rail on a stretch of track.
 
 * Stub for the unified rail builder/remover
 
 * @param tile start tile of drag
 
 * @param flags operation to perform
 
 * @param p1 end tile of drag
 
 * @param p2 various bitstuffed elements
 
 * - p2 = (bit 0-3) - railroad type normal/maglev (0 = normal, 1 = mono, 2 = maglev)
 
 * - p2 = (bit 4-6) - track-orientation, valid values: 0-5 (Track enum)
 
 * - p2 = (bit 7)   - 0 = build, 1 = remove tracks
 
 * @see CmdRailTrackHelper
 
 */
 
int32 CmdBuildRailroadTrack(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
 
{
 
	return CmdRailTrackHelper(tile, flags, p1, CLRBIT(p2, 7));
 
}
 

	
 
/** Build rail on a stretch of track.
 
 * Stub for the unified rail builder/remover
 
 * @param tile start tile of drag
 
 * @param flags operation to perform
 
 * @param p1 end tile of drag
 
 * @param p2 various bitstuffed elements
 
 * - p2 = (bit 0-3) - railroad type normal/maglev (0 = normal, 1 = mono, 2 = maglev)
 
 * - p2 = (bit 4-6) - track-orientation, valid values: 0-5 (Track enum)
 
 * - p2 = (bit 7)   - 0 = build, 1 = remove tracks
 
 * @see CmdRailTrackHelper
 
 */
 
int32 CmdRemoveRailroadTrack(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
 
{
 
	return CmdRailTrackHelper(tile, flags, p1, SETBIT(p2, 7));
 
}
 

	
 
/** Build a train depot
 
 * @param tile position of the train depot
 
 * @param flags operation to perform
 
 * @param p1 rail type
 
 * @param p2 bit 0..1 entrance direction (DiagDirection)
 
 *
 
 * @todo When checking for the tile slope,
 
 * distingush between "Flat land required" and "land sloped in wrong direction"
 
 */
 
@@ -606,12 +624,13 @@ int32 CmdBuildTrainDepot(TileIndex tile,
 
}
 

	
 
/** Build signals, alternate between double/single, signal/semaphore,
 
 * pre/exit/combo-signals, and what-else not. If the rail piece does not
 
 * have any signals, bit 4 (cycle signal-type) is ignored
 
 * @param tile tile where to build the signals
 
 * @param flags operation to perform
 
 * @param p1 various bitstuffed elements
 
 * - p1 = (bit 0-2) - track-orientation, valid values: 0-5 (Track enum)
 
 * - p1 = (bit 3)   - 1 = override signal/semaphore, or pre/exit/combo signal (CTRL-toggle)
 
 * - p1 = (bit 4)   - 0 = signals, 1 = semaphores
 
 * @param p2 used for CmdBuildManySignals() to copy direction of first signal
 
 * TODO: p2 should be replaced by two bits for "along" and "against" the track.
 
@@ -700,12 +719,13 @@ int32 CmdBuildSingleSignal(TileIndex til
 

	
 
	return cost;
 
}
 

	
 
/** Build many signals by dragging; AutoSignals
 
 * @param tile start tile of drag
 
 * @param flags operation to perform
 
 * @param p1  end tile of drag
 
 * @param p2 various bitstuffed elements
 
 * - p2 = (bit  0- 2) - track-orientation, valid values: 0-5 (Track enum)
 
 * - p2 = (bit  3)    - 1 = override signal/semaphore, or pre/exit/combo signal (CTRL-toggle)
 
 * - p2 = (bit  4)    - 0 = signals, 1 = semaphores
 
 * - p2 = (bit  5)    - 0 = build, 1 = remove signals
 
@@ -787,21 +807,31 @@ static int32 CmdSignalTrackHelper(TileIn
 

	
 
	return error ? CMD_ERROR : total_cost;
 
}
 

	
 
/** Build signals on a stretch of track.
 
 * Stub for the unified signal builder/remover
 
 * @param tile start tile of drag
 
 * @param flags operation to perform
 
 * @param p1  end tile of drag
 
 * @param p2 various bitstuffed elements
 
 * - p2 = (bit  0- 2) - track-orientation, valid values: 0-5 (Track enum)
 
 * - p2 = (bit  3)    - 1 = override signal/semaphore, or pre/exit/combo signal (CTRL-toggle)
 
 * - p2 = (bit  4)    - 0 = signals, 1 = semaphores
 
 * - p2 = (bit  5)    - 0 = build, 1 = remove signals
 
 * - p2 = (bit 24-31) - user defined signals_density
 
 * @see CmdSignalTrackHelper
 
 */
 
int32 CmdBuildSignalTrack(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
 
{
 
	return CmdSignalTrackHelper(tile, flags, p1, p2);
 
}
 

	
 
/** Remove signals
 
 * @param tile coordinates where signal is being deleted from
 
 * @param flags operation to perform
 
 * @param various bitstuffed elements, only track information is used
 
 * - p1 = (bit  0- 2) - track-orientation, valid values: 0-5 (Track enum)
 
 * - p1 = (bit  3)    - override signal/semaphore, or pre/exit/combo signal (CTRL-toggle)
 
 * - p1 = (bit  4)    - 0 = signals, 1 = semaphores
 
 */
 
int32 CmdRemoveSingleSignal(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
 
@@ -839,12 +869,21 @@ int32 CmdRemoveSingleSignal(TileIndex ti
 

	
 
	return _price.remove_signals;
 
}
 

	
 
/** Remove signals on a stretch of track.
 
 * Stub for the unified signal builder/remover
 
 * @param tile start tile of drag
 
 * @param flags operation to perform
 
 * @param p1  end tile of drag
 
 * @param p2 various bitstuffed elements
 
 * - p2 = (bit  0- 2) - track-orientation, valid values: 0-5 (Track enum)
 
 * - p2 = (bit  3)    - 1 = override signal/semaphore, or pre/exit/combo signal (CTRL-toggle)
 
 * - p2 = (bit  4)    - 0 = signals, 1 = semaphores
 
 * - p2 = (bit  5)    - 0 = build, 1 = remove signals
 
 * - p2 = (bit 24-31) - user defined signals_density
 
 * @see CmdSignalTrackHelper
 
 */
 
int32 CmdRemoveSignalTrack(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
 
{
 
	return CmdSignalTrackHelper(tile, flags, p1, SETBIT(p2, 5)); // bit 5 is remove bit
 
}
 
@@ -905,12 +944,13 @@ extern int32 DoConvertStationRail(TileIn
 
extern int32 DoConvertStreetRail(TileIndex tile, RailType totype, bool exec);
 
extern int32 DoConvertTunnelBridgeRail(TileIndex tile, RailType totype, bool exec);
 

	
 
/** Convert one rail type to the other. You can convert normal rail to
 
 * monorail/maglev easily or vice-versa.
 
 * @param tile end tile of rail conversion drag
 
 * @param flags operation to perform
 
 * @param p1 start tile of drag
 
 * @param p2 new railtype to convert to
 
 */
 
int32 CmdConvertRail(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
 
{
 
	int32 ret, cost, money;
 
@@ -1174,15 +1214,12 @@ static void DrawTrackDetails(const TileI
 

	
 

	
 
/**
 
 * Draw ground sprite and track bits
 
 * @param ti TileInfo
 
 * @param track TrackBits to draw
 
 * @param earth Draw as earth
 
 * @param snow Draw as snow
 
 * @param flat Always draw foundation
 
 */
 
static void DrawTrackBits(TileInfo* ti, TrackBits track)
 
{
 
	const RailtypeInfo *rti = GetRailTypeInfo(GetRailType(ti->tile));
 
	SpriteID image;
 
	SpriteID pal = PAL_NONE;
src/road_cmd.cpp
Show inline comments
 
@@ -87,12 +87,13 @@ static bool CheckAllowRemoveRoad(TileInd
 
{
 
	return CheckAllowRemoveRoad(tile, remove, IsLevelCrossingTile(tile) ? GetCrossingRoadOwner(tile) : GetTileOwner(tile), edge_road);
 
}
 

	
 
/** Delete a piece of road.
 
 * @param tile tile where to remove road from
 
 * @param flags operation to perform
 
 * @param p1 bit 0..3 road pieces to remove (RoadBits)
 
 * @param p2 unused
 
 */
 
int32 CmdRemoveRoad(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
 
{
 
	/* cost for removing inner/edge -roads */
 
@@ -248,12 +249,13 @@ static uint32 CheckRoadSlope(Slope tileh
 
	}
 
	return CMD_ERROR;
 
}
 

	
 
/** Build a piece of road.
 
 * @param tile tile where to build road
 
 * @param flags operation to perform
 
 * @param p1 bit 0..3 road pieces to build (RoadBits)
 
 * @param p2 the town that is building the road (0 if not applicable)
 
 */
 
int32 CmdBuildRoad(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
 
{
 
	int32 cost = 0;
 
@@ -399,12 +401,13 @@ int32 DoConvertStreetRail(TileIndex tile
 
	return _price.build_rail / 2;
 
}
 

	
 

	
 
/** Build a long piece of road.
 
 * @param end_tile end tile of drag
 
 * @param flags operation to perform
 
 * @param p1 start tile of drag
 
 * @param p2 various bitstuffed elements
 
 * - p2 = (bit 0) - start tile starts in the 2nd half of tile (p2 & 1)
 
 * - p2 = (bit 1) - end tile starts in the 2nd half of tile (p2 & 2)
 
 * - p2 = (bit 2) - direction: 0 = along x-axis, 1 = along y-axis (p2 & 4)
 
 */
 
@@ -455,12 +458,13 @@ int32 CmdBuildLongRoad(TileIndex end_til
 

	
 
	return (cost == 0) ? CMD_ERROR : cost;
 
}
 

	
 
/** Remove a long piece of road.
 
 * @param end_tile end tile of drag
 
 * @param flags operation to perform
 
 * @param p1 start tile of drag
 
 * @param p2 various bitstuffed elements
 
 * - p2 = (bit 0) - start tile starts in the 2nd half of tile (p2 & 1)
 
 * - p2 = (bit 1) - end tile starts in the 2nd half of tile (p2 & 2)
 
 * - p2 = (bit 2) - direction: 0 = along x-axis, 1 = along y-axis (p2 & 4)
 
 */
 
@@ -509,12 +513,13 @@ int32 CmdRemoveLongRoad(TileIndex end_ti
 

	
 
	return (cost == 0) ? CMD_ERROR : cost;
 
}
 

	
 
/** Build a road depot.
 
 * @param tile tile where to build the depot
 
 * @param flags operation to perform
 
 * @param p1 bit 0..1 entrance direction (DiagDirection)
 
 * @param p2 unused
 
 *
 
 * @todo When checking for the tile slope,
 
 * distingush between "Flat land required" and "land sloped in wrong direction"
 
 */
 
@@ -656,13 +661,12 @@ const byte _road_sloped_sprites[14] = {
 
	0,  0
 
};
 

	
 
/**
 
 * Draw ground sprite and road pieces
 
 * @param ti TileInfo
 
 * @param road RoadBits to draw
 
 */
 
static void DrawRoadBits(TileInfo* ti)
 
{
 
	RoadBits road = GetRoadBits(ti->tile);
 
	const DrawRoadTileStruct *drts;
 
	SpriteID image = 0;
src/roadveh_cmd.cpp
Show inline comments
 
@@ -119,12 +119,13 @@ static int32 EstimateRoadVehCost(EngineI
 
{
 
	return ((_price.roadveh_base >> 3) * RoadVehInfo(engine_type)->base_cost) >> 5;
 
}
 

	
 
/** Build a road vehicle.
 
 * @param tile tile of depot where road vehicle is built
 
 * @param flags operation to perform
 
 * @param p1 bus/truck type being built (engine)
 
 * @param p2 bit 0 when set, the unitnumber will be 0, otherwise it will be a free number
 
 */
 
int32 CmdBuildRoadVeh(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
 
{
 
	int32 cost;
 
@@ -224,12 +225,13 @@ int32 CmdBuildRoadVeh(TileIndex tile, ui
 

	
 
	return cost;
 
}
 

	
 
/** Start/Stop a road vehicle.
 
 * @param tile unused
 
 * @param flags operation to perform
 
 * @param p1 road vehicle ID to start/stop
 
 * @param p2 unused
 
 */
 
int32 CmdStartStopRoadVeh(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
 
{
 
	Vehicle *v;
 
@@ -275,12 +277,13 @@ void ClearSlot(Vehicle *v)
 

	
 
	DEBUG(ms, 3, "Clearing slot at 0x%X", rs->xy);
 
}
 

	
 
/** Sell a road vehicle.
 
 * @param tile unused
 
 * @param flags operation to perform
 
 * @param p1 vehicle ID to be sold
 
 * @param p2 unused
 
 */
 
int32 CmdSellRoadVeh(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
 
{
 
	Vehicle *v;
 
@@ -372,12 +375,13 @@ static const Depot* FindClosestRoadDepot
 
		return GetDepotByTile(rfdd.tile);
 
	}
 
}
 

	
 
/** Send a road vehicle to the depot.
 
 * @param tile unused
 
 * @param flags operation to perform
 
 * @param p1 vehicle ID to send to the depot
 
 * @param p2 various bitmasked elements
 
 * - p2 bit 0-3 - DEPOT_ flags (see vehicle.h)
 
 * - p2 bit 8-10 - VLW flag (for mass goto depot)
 
 */
 
int32 CmdSendRoadVehToDepot(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
 
@@ -444,12 +448,13 @@ int32 CmdSendRoadVehToDepot(TileIndex ti
 

	
 
	return 0;
 
}
 

	
 
/** Turn a roadvehicle around.
 
 * @param tile unused
 
 * @param flags operation to perform
 
 * @param p1 vehicle ID to turn
 
 * @param p2 unused
 
 */
 
int32 CmdTurnRoadVeh(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
 
{
 
	Vehicle *v;
 
@@ -1063,16 +1068,16 @@ static inline NPFFoundTargetData PerfNPF
 
	return ret;
 
}
 

	
 
/**
 
 * Returns direction to for a road vehicle to take or
 
 * INVALID_TRACKDIR if the direction is currently blocked
 
 * @param v        the vehicle to do the pathfinding for
 
 * @param v        the Vehicle to do the pathfinding for
 
 * @param tile     the where to start the pathfinding
 
 * @param enterdir the direction the vehicle enters the tile from
 
 * @return the trackdir to take
 
 * @return the Trackdir to take
 
 */
 
static Trackdir RoadFindPathToDest(Vehicle* v, TileIndex tile, DiagDirection enterdir)
 
{
 
#define return_track(x) { best_track = (Trackdir)x; goto found_best_track; }
 

	
 
	TileIndex desttile;
 
@@ -1838,12 +1843,13 @@ void RoadVehiclesYearlyLoop()
 
		}
 
	}
 
}
 

	
 
/** Refit a road vehicle to the specified cargo type
 
 * @param tile unused
 
 * @param flags operation to perform
 
 * @param p1 Vehicle ID of the vehicle to refit
 
 * @param p2 Bitstuffed elements
 
 * - p2 = (bit 0-7) - the new cargo type to refit to
 
 * - p2 = (bit 8-15) - the new cargo subtype to refit to
 
 */
 
int32 CmdRefitRoadVeh(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
src/settings.cpp
Show inline comments
 
@@ -409,13 +409,13 @@ static int lookup_oneofmany(const char *
 
	}
 
}
 

	
 
/** Find the set-integer value MANYofMANY type in a string
 
 * @param many full domain of values the MANYofMANY setting can have
 
 * @param str the current string value of the setting, each individual
 
 * of seperated by a whitespace\tab or | character
 
 * of seperated by a whitespace,tab or | character
 
 * @return the 'fully' set integer, or -1 if a set is not found */
 
static uint32 lookup_manyofmany(const char *many, const char *str)
 
{
 
	const char *s;
 
	int r;
 
	uint32 res = 0;
 
@@ -679,13 +679,14 @@ static void Write_ValidateSetting(void *
 
}
 

	
 
/** Load values from a group of an IniFile structure into the internal representation
 
 * @param ini pointer to IniFile structure that holds administrative information
 
 * @param sd pointer to SettingDesc structure whose internally pointed variables will
 
 *        be given values
 
 * @param grpname the group of the IniFile to search in for the new values */
 
 * @param grpname the group of the IniFile to search in for the new values
 
 * @param object pointer to the object been loaded */
 
static void ini_load_settings(IniFile *ini, const SettingDesc *sd, const char *grpname, void *object)
 
{
 
	IniGroup *group;
 
	IniGroup *group_def = ini_getgroup(ini, grpname, -1);
 
	IniItem *item;
 
	const void *p;
 
@@ -749,12 +750,13 @@ static void ini_load_settings(IniFile *i
 

	
 
/** Save the values of settings to the inifile.
 
 * @param ini pointer to IniFile structure
 
 * @param sd read-only SettingDesc structure which contains the unmodified,
 
 *        loaded values of the configuration file and various information about it
 
 * @param grpname holds the name of the group (eg. [network]) where these will be saved
 
 * @param object pointer to the object been saved
 
 * The function works as follows: for each item in the SettingDesc structure we
 
 * have a look if the value has changed since we started the game (the original
 
 * values are reloaded when saving). If settings indeed have changed, we get
 
 * these and save them.
 
 */
 
static void ini_save_settings(IniFile *ini, const SettingDesc *sd, const char *grpname, void *object)
 
@@ -862,13 +864,13 @@ static void ini_save_settings(IniFile *i
 
}
 

	
 
/** Loads all items from a 'grpname' section into a list
 
 * The list parameter can be a NULL pointer, in this case nothing will be
 
 * saved and a callback function should be defined that will take over the
 
 * list-handling and store the data itself somewhere.
 
 * @param IniFile handle to the ini file with the source data
 
 * @param ini IniFile handle to the ini file with the source data
 
 * @param grpname character string identifying the section-header of the ini
 
 * file that will be parsed
 
 * @param list pointer to an string(pointer) array that will store the parsed
 
 * entries of the given section
 
 * @param len the maximum number of items available for the above list
 
 * @param proc callback function that can override how the values are stored
 
@@ -1725,12 +1727,14 @@ static const SettingDesc *GetSettingDesc
 
{
 
	if (index >= lengthof(_patch_settings)) return NULL;
 
	return &_patch_settings[index];
 
}
 

	
 
/** Network-safe changing of patch-settings (server-only).
 
 * @param tile unused
 
 * @param flags operation to perform
 
 * @param p1 the index of the patch in the SettingDesc array which identifies it
 
 * @param p2 the new value for the patch
 
 * The new value is properly clamped to its minimum/maximum when setting
 
 * @see _patch_settings
 
 */
 
int32 CmdChangePatchSetting(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
 
@@ -1875,21 +1879,22 @@ static void LoadSettings(const SettingDe
 

	
 
		if (!SlObjectMember(ptr, sld)) continue;
 
	}
 
}
 

	
 
/** Loadhandler for a list of global variables
 
 * @param sdg pointer for the global variable list SettingDescGlobVarList
 
 * @note this is actually a stub for LoadSettings with the
 
 * object pointer set to NULL */
 
static inline void LoadSettingsGlobList(const SettingDescGlobVarList *sdg)
 
{
 
	LoadSettings((const SettingDesc*)sdg, NULL);
 
}
 

	
 
/** Save and load handler for patches/settings
 
 * @param osd SettingDesc struct containing all information
 
 * @param sd SettingDesc struct containing all information
 
 * @param object can be either NULL in which case we load global variables or
 
 * a pointer to a struct which is getting saved */
 
static void SaveSettings(const SettingDesc *sd, void *object)
 
{
 
	/* We need to write the CH_RIFF header, but unfortunately can't call
 
	 * SlCalcLength() because we have a different format. So do this manually */
src/settings_gui.cpp
Show inline comments
 
@@ -222,12 +222,13 @@ static void GameOptionsWndProc(Window *w
 
	}
 

	
 
}
 

	
 
/** Change the side of the road vehicles drive on (server only).
 
 * @param tile unused
 
 * @param flags operation to perform
 
 * @param p1 the side of the road; 0 = left side and 1 = right side
 
 * @param p2 unused
 
 */
 
int32 CmdSetRoadDriveSide(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
 
{
 
	/* Check boundaries and you can only change this if NO vehicles have been built yet,
src/smallmap_gui.cpp
Show inline comments
 
@@ -393,13 +393,13 @@ static inline uint32 GetSmallMapContours
 
		ApplyMask(_map_height_bits[TileHeight(tile)], &_smallmap_contours_andor[t]);
 
}
 

	
 
/**
 
 * Return the color a tile would be displayed with in the small map in mode "Vehicles".
 
 *
 
 * @param t The tile of which we would like to get the color.
 
 * @param tile The tile of which we would like to get the color.
 
 * @return The color of tile in the small map in mode "Vehicles"
 
 */
 
static inline uint32 GetSmallMapVehiclesPixels(TileIndex tile)
 
{
 
	TileType t = GetEffectiveTileType(tile);
 

	
 
@@ -423,13 +423,13 @@ static inline uint32 GetSmallMapIndustri
 
	return ApplyMask(MKCOLOR(0x54545454), &_smallmap_vehicles_andor[t]);
 
}
 

	
 
/**
 
 * Return the color a tile would be displayed with in the small map in mode "Routes".
 
 *
 
 * @param t The tile of which we would like to get the color.
 
 * @param tile The tile of which we would like to get the color.
 
 * @return The color of tile  in the small map in mode "Routes"
 
 */
 
static inline uint32 GetSmallMapRoutesPixels(TileIndex tile)
 
{
 
	TileType t = GetEffectiveTileType(tile);
 
	uint32 bits;
 
@@ -499,13 +499,13 @@ static inline uint32 GetSmallMapVegetati
 

	
 
static uint32 _owner_colors[OWNER_END + 1];
 

	
 
/**
 
 * Return the color a tile would be displayed with in the small map in mode "Owner".
 
 *
 
 * @param t The tile of which we would like to get the color.
 
 * @param tile The tile of which we would like to get the color.
 
 * @return The color of tile in the small map in mode "Owner"
 
 */
 
static inline uint32 GetSmallMapOwnerPixels(TileIndex tile)
 
{
 
	Owner o;
 

	
src/station_cmd.cpp
Show inline comments
 
@@ -786,12 +786,13 @@ static void GetStationLayout(byte *layou
 
		}
 
	}
 
}
 

	
 
/** Build railroad station
 
 * @param tile_org starting position of station dragging/placement
 
 * @param flags operation to perform
 
 * @param p1 various bitstuffed elements
 
 * - p1 = (bit  0)    - orientation (Axis)
 
 * - p1 = (bit  8-15) - number of tracks
 
 * - p1 = (bit 16-23) - platform length
 
 * @param p2 various bitstuffed elements
 
 * - p2 = (bit  0- 3) - railtype (p2 & 0xF)
 
@@ -1020,12 +1021,13 @@ restart:
 
	st->train_tile = tile;
 
}
 

	
 
/** Remove a single tile from a railroad station.
 
 * This allows for custom-built station with holes and weird layouts
 
 * @param tile tile of station piece to remove
 
 * @param flags operation to perform
 
 * @param p1 unused
 
 * @param p2 unused
 
 */
 
int32 CmdRemoveFromRailroadStation(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
 
{
 
	SET_EXPENSES_TYPE(EXPENSES_CONSTRUCTION);
 
@@ -1171,12 +1173,14 @@ static RoadStop **FindRoadStopSpot(bool 
 
		return &stop->next;
 
	}
 
}
 

	
 
/** Build a bus or truck stop
 
 * @param tile tile to build the stop at
 
 * @param flags operation to perform
 
 * @param flags operation to perform
 
 * @param p1 entrance direction (DiagDirection)
 
 * @param p2 bit 0: 0 for Bus stops, 1 for truck stops
 
 *           bit 1: 0 for normal, 1 for drive-through
 
 */
 
int32 CmdBuildRoadStop(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
 
{
 
@@ -1338,12 +1342,13 @@ static int32 RemoveRoadStop(Station *st,
 

	
 
	return (is_truck) ? _price.remove_truck_station : _price.remove_bus_station;
 
}
 

	
 
/** Remove a bus or truck stop
 
 * @param tile tile to remove the stop from
 
 * @param flags operation to perform
 
 * @param p1 not used
 
 * @param p2 bit 0: 0 for Bus stops, 1 for truck stops
 
 */
 
int32 CmdRemoveRoadStop(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
 
{
 
	/* Make sure the specified tile is a road stop of the correct type */
 
@@ -1463,12 +1468,13 @@ static const byte * const _airport_secti
 
	_airport_sections_intercontinental,  // Intercontinental Airport (xxlarge)
 
	_airport_sections_helistation        // Helistation
 
};
 

	
 
/** Place an Airport.
 
 * @param tile tile where airport will be built
 
 * @param flags operation to perform
 
 * @param p1 airport type, @see airport.h
 
 * @param p2 unused
 
 */
 
int32 CmdBuildAirport(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
 
{
 
	bool airport_upgrade = true;
 
@@ -1638,12 +1644,13 @@ static int32 RemoveAirport(Station *st, 
 

	
 
	return cost;
 
}
 

	
 
/** Build a buoy.
 
 * @param tile tile where to place the bouy
 
 * @param flags operation to perform
 
 * @param p1 unused
 
 * @param p2 unused
 
 */
 
int32 CmdBuildBuoy(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
 
{
 
	SET_EXPENSES_TYPE(EXPENSES_CONSTRUCTION);
 
@@ -1746,12 +1753,13 @@ static const TileIndexDiffC _dock_tileof
 
};
 
static const byte _dock_w_chk[4] = { 2, 1, 2, 1 };
 
static const byte _dock_h_chk[4] = { 1, 2, 1, 2 };
 

	
 
/** Build a dock/haven.
 
 * @param tile tile where dock will be built
 
 * @param flags operation to perform
 
 * @param p1 unused
 
 * @param p2 unused
 
 */
 
int32 CmdBuildDock(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
 
{
 
	int32 cost;
 
@@ -2378,12 +2386,13 @@ static void UpdateStationWaiting(Station
 
	InvalidateWindow(WC_STATION_VIEW, st->index);
 
	st->MarkTilesDirty();
 
}
 

	
 
/** Rename a station
 
 * @param tile unused
 
 * @param flags operation to perform
 
 * @param p1 station ID that is to be renamed
 
 * @param p2 unused
 
 */
 
int32 CmdRenameStation(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
 
{
 
	if (!IsValidStationID(p1) || _cmd_text[0] == '\0') return CMD_ERROR;
0 comments (0 inline, 0 general)