mirror of https://github.com/OpenTTD/OpenTTD
(svn r17963) -Codechange: some documentation style
parent
b211e0d5f5
commit
d79439fb3c
|
@ -1101,7 +1101,7 @@ struct PerformanceRatingDetailWindow : Window {
|
||||||
if (score_type == SCORE_LOAN) val = needed - val;
|
if (score_type == SCORE_LOAN) val = needed - val;
|
||||||
|
|
||||||
/* Draw the amount we have against what is needed
|
/* Draw the amount we have against what is needed
|
||||||
* For some of them it is in currency format */
|
* For some of them it is in currency format */
|
||||||
SetDParam(0, val);
|
SetDParam(0, val);
|
||||||
SetDParam(1, needed);
|
SetDParam(1, needed);
|
||||||
switch (score_type) {
|
switch (score_type) {
|
||||||
|
|
|
@ -133,7 +133,7 @@ void NetworkUDPSocketHandler::ReceivePackets()
|
||||||
p.PrepareToRead();
|
p.PrepareToRead();
|
||||||
|
|
||||||
/* If the size does not match the packet must be corrupted.
|
/* If the size does not match the packet must be corrupted.
|
||||||
* Otherwise it will be marked as corrupted later on. */
|
* Otherwise it will be marked as corrupted later on. */
|
||||||
if (nbytes != p.size) {
|
if (nbytes != p.size) {
|
||||||
DEBUG(net, 1, "received a packet with mismatching size from %s", address.GetAddressAsString());
|
DEBUG(net, 1, "received a packet with mismatching size from %s", address.GetAddressAsString());
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1944,7 +1944,7 @@ static void DrawTile_Track(TileInfo *ti)
|
||||||
if (image != SPR_FLAT_GRASS_TILE) image += rti->total_offset;
|
if (image != SPR_FLAT_GRASS_TILE) image += rti->total_offset;
|
||||||
|
|
||||||
/* adjust ground tile for desert
|
/* adjust ground tile for desert
|
||||||
* don't adjust for snow, because snow in depots looks weird */
|
* don't adjust for snow, because snow in depots looks weird */
|
||||||
if (IsSnowRailGround(ti->tile) && _settings_game.game_creation.landscape == LT_TROPIC) {
|
if (IsSnowRailGround(ti->tile) && _settings_game.game_creation.landscape == LT_TROPIC) {
|
||||||
if (image != SPR_FLAT_GRASS_TILE) {
|
if (image != SPR_FLAT_GRASS_TILE) {
|
||||||
image += rti->snow_offset; // tile with tracks
|
image += rti->snow_offset; // tile with tracks
|
||||||
|
|
|
@ -21,11 +21,11 @@
|
||||||
if (CheckSavegameVersion(44)) {
|
if (CheckSavegameVersion(44)) {
|
||||||
Vehicle *v;
|
Vehicle *v;
|
||||||
/* If we remove a station while cargo from it is still enroute, payment calculation will assume
|
/* If we remove a station while cargo from it is still enroute, payment calculation will assume
|
||||||
* 0, 0 to be the source of the cargo, resulting in very high payments usually. v->source_xy
|
* 0, 0 to be the source of the cargo, resulting in very high payments usually. v->source_xy
|
||||||
* stores the coordinates, preserving them even if the station is removed. However, if a game is loaded
|
* stores the coordinates, preserving them even if the station is removed. However, if a game is loaded
|
||||||
* where this situation exists, the cargo-source information is lost. in this case, we set the source
|
* where this situation exists, the cargo-source information is lost. in this case, we set the source
|
||||||
* to the current tile of the vehicle to prevent excessive profits
|
* to the current tile of the vehicle to prevent excessive profits
|
||||||
*/
|
*/
|
||||||
FOR_ALL_VEHICLES(v) {
|
FOR_ALL_VEHICLES(v) {
|
||||||
const VehicleCargoList::List *packets = v->cargo.Packets();
|
const VehicleCargoList::List *packets = v->cargo.Packets();
|
||||||
for (VehicleCargoList::ConstIterator it(packets->begin()); it != packets->end(); it++) {
|
for (VehicleCargoList::ConstIterator it(packets->begin()); it != packets->end(); it++) {
|
||||||
|
@ -36,10 +36,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Store position of the station where the goods come from, so there
|
/* Store position of the station where the goods come from, so there
|
||||||
* are no very high payments when stations get removed. However, if the
|
* are no very high payments when stations get removed. However, if the
|
||||||
* station where the goods came from is already removed, the source
|
* station where the goods came from is already removed, the source
|
||||||
* information is lost. In that case we set it to the position of this
|
* information is lost. In that case we set it to the position of this
|
||||||
* station */
|
* station */
|
||||||
Station *st;
|
Station *st;
|
||||||
FOR_ALL_STATIONS(st) {
|
FOR_ALL_STATIONS(st) {
|
||||||
for (CargoID c = 0; c < NUM_CARGO; c++) {
|
for (CargoID c = 0; c < NUM_CARGO; c++) {
|
||||||
|
|
|
@ -415,8 +415,8 @@ void SlSetLength(size_t length)
|
||||||
switch (_sl.block_mode) {
|
switch (_sl.block_mode) {
|
||||||
case CH_RIFF:
|
case CH_RIFF:
|
||||||
/* Ugly encoding of >16M RIFF chunks
|
/* Ugly encoding of >16M RIFF chunks
|
||||||
* The lower 24 bits are normal
|
* The lower 24 bits are normal
|
||||||
* The uppermost 4 bits are bits 24:27 */
|
* The uppermost 4 bits are bits 24:27 */
|
||||||
assert(length < (1 << 28));
|
assert(length < (1 << 28));
|
||||||
SlWriteUint32((uint32)((length & 0xFFFFFF) | ((length >> 24) << 28)));
|
SlWriteUint32((uint32)((length & 0xFFFFFF) | ((length >> 24) << 28)));
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -147,10 +147,10 @@ namespace SQConvert {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper class to recognize the function type (retval type, args) and use the proper specialization
|
* Helper class to recognize the function type (retval type, args) and use the proper specialization
|
||||||
* for SQ callback. The partial specializations for the second arg (Tis_void_retval) are not possible
|
* for SQ callback. The partial specializations for the second arg (Tis_void_retval) are not possible
|
||||||
* on the function. Therefore the class is used instead.
|
* on the function. Therefore the class is used instead.
|
||||||
*/
|
*/
|
||||||
template <typename Tfunc, bool Tis_void_retval = HasVoidReturnT<Tfunc>::Yes> struct HelperT;
|
template <typename Tfunc, bool Tis_void_retval = HasVoidReturnT<Tfunc>::Yes> struct HelperT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1442,10 +1442,10 @@ static void ViewportDrawStrings(DrawPixelInfo *dpi, const StringSpriteToDrawVect
|
||||||
if (IsInvisibilitySet(TO_SIGNS) && ss->string != STR_WHITE_SIGN) continue;
|
if (IsInvisibilitySet(TO_SIGNS) && ss->string != STR_WHITE_SIGN) continue;
|
||||||
|
|
||||||
/* if we didn't draw a rectangle, or if transparant building is on,
|
/* if we didn't draw a rectangle, or if transparant building is on,
|
||||||
* draw the text in the colour the rectangle would have */
|
* draw the text in the colour the rectangle would have */
|
||||||
if (IsTransparencySet(TO_SIGNS) && ss->string != STR_WHITE_SIGN) {
|
if (IsTransparencySet(TO_SIGNS) && ss->string != STR_WHITE_SIGN) {
|
||||||
/* Real colours need the IS_PALETTE_COLOUR flag
|
/* Real colours need the IS_PALETTE_COLOUR flag
|
||||||
* otherwise colours from _string_colourmap are assumed. */
|
* otherwise colours from _string_colourmap are assumed. */
|
||||||
colour = (TextColour)_colour_gradient[ss->colour][6] | IS_PALETTE_COLOUR;
|
colour = (TextColour)_colour_gradient[ss->colour][6] | IS_PALETTE_COLOUR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue