Age | Commit message (Collapse) | Author |
|
when drawing a train's image.
- Draw the depot highlight box after drawing all engines on a line, so that the box isn't hidden.
|
|
depends on rail.h and not the other way round anymore
|
|
they close themselves
This is unnecessary, because their parents already close them when they get closed
Therefore remove the code for the periodic checks
|
|
scope, CSE for readability, DeMorgan, if cascades -> switch, whitespace, parentheses, bracing, misc.
|
|
_new_vehicle_id is enough.
|
|
clipping area to draw the train image. This fixes a couple of usability issues when shorter wagons are used in the depot; shorter wagons scrolled at a different speed, and not all wagons were visible sometimes.
|
|
|
|
It serves no real purpose except causing confusion
|
|
of 29 pixels, for sets which use 32 pixel long engines/wagons.
|
|
DrawTrainImage() for each row, as we already loop to find the vehicles to
draw. Fixes a potential issue of extraneous wagons being drawn, if they are very short.
|
|
|
|
purchase list as N/A.
|
|
purchase information. Other vehicle types to come.
|
|
coordinates of the tile to operate on - to a TileIndex
Remove DoCommandByTile(), because now it does the same as DoCommand()
|
|
within the units conversion system, in string.c. This means displaying kmh requires no conversion, instead of being convert from kmh to mph, and then back to kmh again.
|
|
- Use {POWER} and {WEIGHT_S} tags for all strings instead of "{COMMA}units".
|
|
_*_vehicle_info[]; create and use a function to retrieve data, and ensure constness.
|
|
train to a short train where the short train was scrolled off the window would cause a game crash. (Thanks to SimonRC for reporting.)
|
|
code and proofreading, thanks to peter1138 for another lot of code and ideas.
|
|
control-click on a unit in a train in a depot will make the click unit turn around
this is useful if you want "normal" engines to act as dualheaded (one each way) or similar
this only works on single unit units. Multiheaded and articulated engines get a red error box
this is based on a quick hack peter1138 while I made it network safe and correctly handling of multible unit engines
|
|
|
|
DiagDirection and friends
|
|
optimization in the form of the ternary operator.
|
|
function call for drawing of vehicles.
|
|
than one per vehicle type.
|
|
shuffling order of rail vehicle purchase list (and replace vehicle list)
|
|
newgrf_engine.[ch], and add the new files to project files.
|
|
|
|
|
|
|
|
|
|
when viewing another player's vehicles, or as a spectator. (thanks to UnderBuilder for pointing this out)
|
|
class. Also fix typo in r3384.
|
|
window
|
|
CMD_CHANGE_{AIRCRAFT,ROADVEH,SHIP,TRAIN}_SERVICE_INT commands into one CMD_CHANGE_SERVICE_INT command.
As side effect this is a
-Fix: The default AI tried to change the service intervals of vehicles via the CMD_CHANGE_TRAIN_SERVICE_INT command - regardless of the type of the vehicle - which of course failed for non-trains
|
|
s/SRT_SORT_BY/STR_SORT_BY/ (noticed by chu)
|
|
consistent with those widgets in other vehicle type lists. (Stops "Total capacity per cargo type" overflowing)
|
|
their actual use, and add "Close Window" tooltip where missing.
|
|
This means that any user attempt to remove a rear engine will tell the user to move the front engine instead
This fixes the assert when moving multiheaded engines (introduced in r3144)
Note: to make old savegames use this feature, some engines might be turned around in order to link engines in pairs
-Codechange: train subtype is now a bitmask
This allows fast access to info like if it is a wagon or engine and if it is in front and so on
Note: savegame version bump
|
|
-Indentation
-Whitespace
-DeMorgan's Law
-Test with NULL or 0 for non-booleans
-'\0' instead of 0 for chars
-Remove redundantly redundant comments (like DoFoo(); // Do foo)
-Join multiple short lines with a single statement
-Split single lines with multiple statements
-Avoid assignments in if
|
|
|
|
by cargo classes.
|
|
used, for example, by coal tenders.
|
|
window. This affects wagon position, the scroll bar, and the train length counter. No trial and error is required to get the correct length now.
|
|
duplication, and make it apply only to vehicles with a custom image.
|
|
|
|
return values, ... mostly related to the clone vehicle GUI
|
|
- const, whitespace, indentation, bracing, GB/SB, pointless casts
- use the trinary operator where appropriate
- data types (uint[] -> AcceptedCargo, ...)
- if cascade -> switch
- if (ptr) -> if (ptr != NULL)
- DeMorgan's Law
- Fix some comments
- 0 -> '\0', change magic numbers to symbolic constants
|
|
comments, excess empty lines, minor other changes
nothing spectacular, just some stuff, which piled up
|
|
|