summaryrefslogtreecommitdiff
path: root/train_gui.c
AgeCommit message (Collapse)Author
2006-05-21(svn r4940) Remove the dubious feature of remembering the last built depot. ↵tron
It serves no real purpose except causing confusion
2006-05-14(svn r4869) - NewGRF: support setting train list vehicle width to 32 instead ↵peter1138
of 29 pixels, for sets which use 32 pixel long engines/wagons.
2006-05-14(svn r4868) - Codechange: in the train detail window, don't call ↵peter1138
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.
2006-05-08(svn r4781) - NewGRF: give _traininfo_vehicle_pitch a proper declarationpeter1138
2006-04-28(svn r4610) - If a wagon has a capacity of 0 (zero), display it in the ↵peter1138
purchase list as N/A.
2006-04-23(svn r4562) - NewGRF: Add additional vehicle text to train engine and wagon ↵peter1138
purchase information. Other vehicle types to come.
2006-04-10(svn r4342) Change the first two parameters of commands - virtual pixel ↵tron
coordinates of the tile to operate on - to a TileIndex Remove DoCommandByTile(), because now it does the same as DoCommand()
2006-04-08(svn r4322) - Codechange: Remove conversion of kmh to mph from gui code to ↵peter1138
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.
2006-03-31(svn r4211) - Removed measuring units from the names of two strings.peter1138
- Use {POWER} and {WEIGHT_S} tags for all strings instead of "{COMMA}units".
2006-03-31(svn r4201) - Codechange: Do for _engine_info[] what we do for ↵peter1138
_*_vehicle_info[]; create and use a function to retrieve data, and ensure constness.
2006-03-31(svn r4192) - Fix: In the depot, moving wagons from the end of a very long ↵peter1138
train to a short train where the short train was scrolled off the window would cause a game crash. (Thanks to SimonRC for reporting.)
2006-03-29(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of ↵celestar
code and proofreading, thanks to peter1138 for another lot of code and ideas.
2006-03-18(svn r3944) -Feature: it's now possible to turn a single unit in a trainbjarni
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
2006-03-17(svn r3916) Get/Set the rail type by [GS]etRailType{Crossing,OnBridge,}()tron
2006-03-08(svn r3783) Replace further ints and magic numbers by Direction, ↵tron
DiagDirection and friends
2006-02-20(svn r3631) - 2cc: Remove use of some temporary variables and perform minor ↵peter1138
optimization in the form of the ternary operator.
2006-02-20(svn r3620) - 2cc: Replace use of macro to determine colour map with a ↵peter1138
function call for drawing of vehicles.
2006-02-11(svn r3588) - Refit: Use only one global to return the refit capacity rather ↵peter1138
than one per vehicle type.
2006-02-04(svn r3546) - NewGRF feature: Implement rail vehicle 'property' 0x1A: allows ↵peter1138
shuffling order of rail vehicle purchase list (and replace vehicle list)
2006-02-03(svn r3524) - Split newgrf features from engine.[ch] into ↵peter1138
newgrf_engine.[ch], and add the new files to project files.
2006-02-02(svn r3521) - Feature: Allow trains details view to be resized.peter1138
2006-02-02(svn r3520) Remove unused parameters from some functionstron
2006-02-01(svn r3511) More whitespace ([FS#46] by Rubidium)tron
2006-02-01(svn r3510) Fiddle with whitespace and parenthesestron
2006-01-21(svn r3415) - Fix: Disable the clone and refit buttons in the train view ↵peter1138
when viewing another player's vehicles, or as a spectator. (thanks to UnderBuilder for pointing this out)
2006-01-07(svn r3388) - NewGRF: Allow train running cost class to differ from engine ↵peter1138
class. Also fix typo in r3384.
2006-01-06(svn r3370) Improve alignment of text within total cargo tab of train view ↵peter1138
window
2006-01-05(svn r3367) Unify the 4 distinct ↵tron
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
2005-12-29(svn r3354) Fix a typo, which survived for about 3000 revisions: ↵tron
s/SRT_SORT_BY/STR_SORT_BY/ (noticed by chu)
2005-12-28(svn r3351) Make sort criteria selection widgets in player train list ↵peter1138
consistent with those widgets in other vehicle type lists. (Stops "Total capacity per cargo type" overflowing)
2005-12-07(svn r3270) Correct all (mis)uses of WWT_CLOSEBOX / WWT_TEXTBTN to reflect ↵peter1138
their actual use, and add "Close Window" tooltip where missing.
2005-11-18(svn r3218) -Feature: Multiheaded train engines will now stay in the same trainbjarni
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
2005-11-14(svn r3181) -Bracingtron
-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
2005-11-13(svn r3172) static, consttron
2005-11-06(svn r3148) -NewGRF, Feature: Add support for cargo refitting specification ↵peter1138
by cargo classes.
2005-11-05(svn r3139) -NewGRF, Feature: support for articulated rail vehicles. This is ↵peter1138
used, for example, by coal tenders.
2005-11-04(svn r3130) Calculate shorter wagon lengths more precisely in train depot ↵peter1138
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.
2005-10-30(svn r3107) -NewGRF: Move train y-position offset adjustment to remove code ↵peter1138
duplication, and make it apply only to vehicles with a custom image.
2005-10-29(svn r3099) Copy&pasto in r3098tron
2005-10-28(svn r3098) static, const, uint -> TileIndex, indentation, bracing, unused ↵tron
return values, ... mostly related to the clone vehicle GUI
2005-10-23(svn r3078) Some more stuff, which piled up:tron
- 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
2005-10-22(svn r3077) static, const, bracing, indentation, 0 -> '\0'/NULL, typos in ↵tron
comments, excess empty lines, minor other changes nothing spectacular, just some stuff, which piled up
2005-10-16(svn r3049) Replace byte/int/uint by RailType where appropriatetron
2005-10-15(svn r3047) The parameters for the railtype check got flipped in the train ↵tron
build window (this caused no visible problem so far, therefore no Fix tag)
2005-10-15(svn r3046) Replace some numbers with sprite names and fix a typo in the ↵tron
sprite list
2005-10-07(svn r3024) -Codechange: Another batch of replacements of ↵tron
int/uint/int16/byte/-1 with proper types and constants
2005-10-05(svn r3019) -Codechange: Replace explicit shifting/anding/oring with GB and SBtron
2005-10-03(svn r3010) Get rid of quite some dubious casts, either by using GB(), ↵tron
proper types or just removing them
2005-10-01(svn r3003) Change int, uint, uin16 and byte to EngineID where appropriate, ↵tron
plus some related changes (mostly casts)
2005-09-27(svn r2992) Use PlayerID, StationID and INVALID_STATION instead of int, int ↵tron
and -1