peter1138
feed914b97
(svn r4869) - NewGRF: support setting train list vehicle width to 32 instead of 29 pixels, for sets which use 32 pixel long engines/wagons.
19 years ago
peter1138
90af6ee14f
(svn r4868) - Codechange: in the train detail window, don't call 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.
19 years ago
peter1138
05e2c6b886
(svn r4781) - NewGRF: give _traininfo_vehicle_pitch a proper declaration
19 years ago
peter1138
9415828900
(svn r4610) - If a wagon has a capacity of 0 (zero), display it in the purchase list as N/A.
19 years ago
peter1138
4a8bcad56a
(svn r4562) - NewGRF: Add additional vehicle text to train engine and wagon purchase information. Other vehicle types to come.
19 years ago
tron
35e93e451f
(svn r4342) Change the first two parameters of commands - virtual pixel coordinates of the tile to operate on - to a TileIndex
...
Remove DoCommandByTile(), because now it does the same as DoCommand()
19 years ago
peter1138
59ace676eb
(svn r4322) - Codechange: Remove conversion of kmh to mph from gui code to 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.
19 years ago
peter1138
a2ea99dc66
(svn r4211) - Removed measuring units from the names of two strings.
...
- Use {POWER} and {WEIGHT_S} tags for all strings instead of "{COMMA}units".
19 years ago
peter1138
eb15688358
(svn r4201) - Codechange: Do for _engine_info[] what we do for _*_vehicle_info[]; create and use a function to retrieve data, and ensure constness.
19 years ago
peter1138
bc3f98c4dd
(svn r4192) - Fix: In the depot, moving wagons from the end of a very long train to a short train where the short train was scrolled off the window would cause a game crash. (Thanks to SimonRC for reporting.)
19 years ago
celestar
6c44bf5012
(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas.
19 years ago
bjarni
aa22bfb178
(svn r3944) -Feature: it's now possible to turn a single unit in a train
...
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
19 years ago
tron
7b1c7c31fb
(svn r3916) Get/Set the rail type by [GS]etRailType{Crossing,OnBridge,}()
19 years ago
tron
8cfcdaa733
(svn r3783) Replace further ints and magic numbers by Direction, DiagDirection and friends
19 years ago
peter1138
97559a9df9
(svn r3631) - 2cc: Remove use of some temporary variables and perform minor optimization in the form of the ternary operator.
19 years ago
peter1138
b5cd24f05d
(svn r3620) - 2cc: Replace use of macro to determine colour map with a function call for drawing of vehicles.
19 years ago
peter1138
f9b4537228
(svn r3588) - Refit: Use only one global to return the refit capacity rather than one per vehicle type.
19 years ago
peter1138
2d67fc8741
(svn r3546) - NewGRF feature: Implement rail vehicle 'property' 0x1A: allows shuffling order of rail vehicle purchase list (and replace vehicle list)
19 years ago
peter1138
6c28b1cec7
(svn r3524) - Split newgrf features from engine.[ch] into newgrf_engine.[ch], and add the new files to project files.
19 years ago
peter1138
8e16eee137
(svn r3521) - Feature: Allow trains details view to be resized.
19 years ago
tron
17ec6ed70d
(svn r3520) Remove unused parameters from some functions
19 years ago
tron
1c3e8630fe
(svn r3511) More whitespace ([FS#46] by Rubidium)
19 years ago
tron
9712d6f639
(svn r3510) Fiddle with whitespace and parentheses
19 years ago
peter1138
ca8a27a592
(svn r3415) - Fix: Disable the clone and refit buttons in the train view when viewing another player's vehicles, or as a spectator. (thanks to UnderBuilder for pointing this out)
19 years ago
peter1138
e1f9b72c82
(svn r3388) - NewGRF: Allow train running cost class to differ from engine class. Also fix typo in r3384.
19 years ago
peter1138
fd3a596c82
(svn r3370) Improve alignment of text within total cargo tab of train view window
19 years ago
tron
2053685fb5
(svn r3367) Unify the 4 distinct 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
19 years ago
tron
24d56f889d
(svn r3354) Fix a typo, which survived for about 3000 revisions: s/SRT_SORT_BY/STR_SORT_BY/ (noticed by chu)
19 years ago
peter1138
139d1ed1eb
(svn r3351) Make sort criteria selection widgets in player train list consistent with those widgets in other vehicle type lists. (Stops "Total capacity per cargo type" overflowing)
19 years ago
peter1138
5f3dc36983
(svn r3270) Correct all (mis)uses of WWT_CLOSEBOX / WWT_TEXTBTN to reflect their actual use, and add "Close Window" tooltip where missing.
19 years ago
bjarni
16e65960b9
(svn r3218) -Feature: Multiheaded train engines will now stay in the same train
...
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
19 years ago
tron
9d0e7b6458
(svn r3181) -Bracing
...
-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
19 years ago
tron
81e5b16d71
(svn r3172) static, const
19 years ago
peter1138
34c503cabf
(svn r3148) -NewGRF, Feature: Add support for cargo refitting specification by cargo classes.
19 years ago
peter1138
0d9379f904
(svn r3139) -NewGRF, Feature: support for articulated rail vehicles. This is used, for example, by coal tenders.
19 years ago
peter1138
748cde25c4
(svn r3130) Calculate shorter wagon lengths more precisely in train depot 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.
19 years ago
peter1138
f50ec50d9b
(svn r3107) -NewGRF: Move train y-position offset adjustment to remove code duplication, and make it apply only to vehicles with a custom image.
19 years ago
tron
4caa0e593d
(svn r3099) Copy&pasto in r3098
19 years ago
tron
7c14b86aaf
(svn r3098) static, const, uint -> TileIndex, indentation, bracing, unused return values, ... mostly related to the clone vehicle GUI
19 years ago
tron
181d586a7c
(svn r3078) Some more stuff, which piled up:
...
- 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
19 years ago
tron
0b936c3222
(svn r3077) static, const, bracing, indentation, 0 -> '\0'/NULL, typos in comments, excess empty lines, minor other changes
...
nothing spectacular, just some stuff, which piled up
19 years ago
tron
e3d1e43559
(svn r3049) Replace byte/int/uint by RailType where appropriate
19 years ago
tron
10489083c7
(svn r3047) The parameters for the railtype check got flipped in the train build window (this caused no visible problem so far, therefore no Fix tag)
19 years ago
tron
53a4a6a0f4
(svn r3046) Replace some numbers with sprite names and fix a typo in the sprite list
19 years ago
tron
8980891b09
(svn r3024) -Codechange: Another batch of replacements of int/uint/int16/byte/-1 with proper types and constants
19 years ago
tron
39f5dbfd3b
(svn r3019) -Codechange: Replace explicit shifting/anding/oring with GB and SB
19 years ago
tron
6d7c7e67b2
(svn r3010) Get rid of quite some dubious casts, either by using GB(), proper types or just removing them
19 years ago
tron
0ad3902acf
(svn r3003) Change int, uint, uin16 and byte to EngineID where appropriate, plus some related changes (mostly casts)
19 years ago
tron
f608232673
(svn r2992) Use PlayerID, StationID and INVALID_STATION instead of int, int and -1
19 years ago
peter1138
5dcb1e34fd
(svn r2982) Newgrf: Added patch option for wagon speed limits. This is enabled by default.
19 years ago