Age | Commit message (Collapse) | Author |
|
the offset since 1920
-Codechange: store all year related variables that are _not_ stored in a savegame/transported over the network in the same format as _cur_year
|
|
convert a Date to/from a YearMonthDay.
-Cleanup: swap ConvertDateToYMD's parameters to make the order consistent with the name of the function.
|
|
BASE_YEAR when comparing _cur_year with a 'full' year.
-Cleanup: replace some magic '1920' values with BASE_YEAR.
|
|
of r5907.
|
|
code. Less code, less data, simply better
|
|
date.[ch]
-Cleanup: fix whitespace related coding style issues in date.[ch]
-Cleanup: make original comments doxygen compatible and remove/change outdated comments
|
|
now the user will get an error if he tries to start the train and the status bar will say "no power" instead of "stopped"
Electric trains already driving in and out of non-electrified depots will still do so, but you can't start new ones
|
|
|
|
Spotted by gigajum
|
|
|
|
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
|