Commit Graph

151 Commits

Author SHA1 Message Date
belugas 91c9f46a5f (svn r5404) Fix (r5391) : Yet another typo. Nothing specatular :)
Spotted by gigajum
2006-06-28 17:46:55 +00:00
tron 2b27073156 (svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectacular 2006-06-27 21:25:53 +00:00
peter1138 02e9656ec3 (svn r5318) - Allow room for a single pixel overflow on the first engine 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.
2006-06-20 07:07:28 +00:00
tron 1ad425e802 (svn r5309) Partially fix the rail header dependency fiasco: rail_map.h now depends on rail.h and not the other way round anymore 2006-06-18 15:28:29 +00:00
tron 88f9473c85 (svn r5225) Some windows periodically check if their parent exists - if not they close themselves
This is unnecessary, because their parents already close them when they get closed
Therefore remove the code for the periodic checks
2006-06-11 14:56:21 +00:00
tron 0a72639c2d (svn r5210) Many small changes which piled up: const, unsigned, variable scope, CSE for readability, DeMorgan, if cascades -> switch, whitespace, parentheses, bracing, misc. 2006-06-10 08:37:41 +00:00
tron a0caafeb50 (svn r5094) Remove _new_{aircraft,roadveh,ship,train,wagon}_id. _new_vehicle_id is enough. 2006-06-04 09:28:33 +00:00
peter1138 2d88fb54b9 (svn r5046) - Implement smooth horizontal depot scrolling by setting up a 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. 2006-05-30 21:19:46 +00:00
tron 58458812a4 (svn r4943) uint tile -> TileIndex tile, byte player -> PlayerID player 2006-05-21 16:18:58 +00:00
tron 3282efda88 (svn r4940) Remove the dubious feature of remembering the last built depot. It serves no real purpose except causing confusion 2006-05-21 13:51:36 +00:00
peter1138 e29d60b21b (svn r4869) - NewGRF: support setting train list vehicle width to 32 instead of 29 pixels, for sets which use 32 pixel long engines/wagons. 2006-05-14 20:58:12 +00:00
peter1138 77a3900d5d (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.
2006-05-14 20:38:09 +00:00
peter1138 e33db100b9 (svn r4781) - NewGRF: give _traininfo_vehicle_pitch a proper declaration 2006-05-08 10:01:34 +00:00
peter1138 376bda7007 (svn r4610) - If a wagon has a capacity of 0 (zero), display it in the purchase list as N/A. 2006-04-28 19:56:18 +00:00
peter1138 a1713eacb5 (svn r4562) - NewGRF: Add additional vehicle text to train engine and wagon purchase information. Other vehicle types to come. 2006-04-23 22:35:37 +00:00
tron 81e6d68f95 (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()
2006-04-10 07:15:58 +00:00
peter1138 ffadd91ca9 (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. 2006-04-08 12:04:23 +00:00
peter1138 949758e109 (svn r4211) - Removed measuring units from the names of two strings.
- Use {POWER} and {WEIGHT_S} tags for all strings instead of "{COMMA}units".
2006-03-31 17:40:31 +00:00
peter1138 cd0a67dc65 (svn r4201) - Codechange: Do for _engine_info[] what we do for _*_vehicle_info[]; create and use a function to retrieve data, and ensure constness. 2006-03-31 12:59:43 +00:00
peter1138 9d3852bb57 (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.) 2006-03-31 08:39:10 +00:00
celestar a7d8ad0004 (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. 2006-03-29 16:30:26 +00:00
bjarni a36f8a46fa (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
2006-03-18 13:00:32 +00:00
tron 89090790c2 (svn r3916) Get/Set the rail type by [GS]etRailType{Crossing,OnBridge,}() 2006-03-17 10:10:31 +00:00
tron fbe939b31f (svn r3783) Replace further ints and magic numbers by Direction, DiagDirection and friends 2006-03-08 06:55:33 +00:00
peter1138 a66e4c7e6c (svn r3631) - 2cc: Remove use of some temporary variables and perform minor optimization in the form of the ternary operator. 2006-02-20 21:49:31 +00:00
peter1138 4f9ea7640a (svn r3620) - 2cc: Replace use of macro to determine colour map with a function call for drawing of vehicles. 2006-02-20 09:26:07 +00:00
peter1138 6f5f3101b6 (svn r3588) - Refit: Use only one global to return the refit capacity rather than one per vehicle type. 2006-02-11 09:24:51 +00:00
peter1138 500a7e6627 (svn r3546) - NewGRF feature: Implement rail vehicle 'property' 0x1A: allows shuffling order of rail vehicle purchase list (and replace vehicle list) 2006-02-04 21:48:46 +00:00
peter1138 b88904f345 (svn r3524) - Split newgrf features from engine.[ch] into newgrf_engine.[ch], and add the new files to project files. 2006-02-03 12:55:21 +00:00
peter1138 fc5a00d066 (svn r3521) - Feature: Allow trains details view to be resized. 2006-02-02 08:03:10 +00:00
tron b844aa2db3 (svn r3520) Remove unused parameters from some functions 2006-02-02 07:15:46 +00:00
tron 84fb96fe85 (svn r3511) More whitespace ([FS#46] by Rubidium) 2006-02-01 07:36:15 +00:00
tron 22dc05faf2 (svn r3510) Fiddle with whitespace and parentheses 2006-02-01 06:32:03 +00:00
peter1138 a1342c9d52 (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) 2006-01-21 22:09:25 +00:00
peter1138 e81c316134 (svn r3388) - NewGRF: Allow train running cost class to differ from engine class. Also fix typo in r3384. 2006-01-07 16:47:59 +00:00
peter1138 71fb252a8a (svn r3370) Improve alignment of text within total cargo tab of train view window 2006-01-06 09:50:43 +00:00
tron af70b49bf7 (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
2006-01-05 21:35:54 +00:00
tron 6820aada04 (svn r3354) Fix a typo, which survived for about 3000 revisions: s/SRT_SORT_BY/STR_SORT_BY/ (noticed by chu) 2005-12-29 19:06:44 +00:00
peter1138 a4de62577d (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) 2005-12-28 09:40:26 +00:00
peter1138 1c57091230 (svn r3270) Correct all (mis)uses of WWT_CLOSEBOX / WWT_TEXTBTN to reflect their actual use, and add "Close Window" tooltip where missing. 2005-12-07 15:48:52 +00:00
bjarni 22a4679837 (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
2005-11-18 23:41:03 +00:00
tron f7abff5f96 (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
2005-11-14 19:48:04 +00:00
tron ee15e3de13 (svn r3172) static, const 2005-11-13 13:43:55 +00:00
peter1138 bc25cd89bf (svn r3148) -NewGRF, Feature: Add support for cargo refitting specification by cargo classes. 2005-11-06 13:42:26 +00:00
peter1138 267314b4d0 (svn r3139) -NewGRF, Feature: support for articulated rail vehicles. This is used, for example, by coal tenders. 2005-11-05 16:07:26 +00:00
peter1138 c8ea909811 (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. 2005-11-04 07:38:26 +00:00
peter1138 1a2ad83b00 (svn r3107) -NewGRF: Move train y-position offset adjustment to remove code duplication, and make it apply only to vehicles with a custom image. 2005-10-30 21:47:42 +00:00
tron 187ea08e1d (svn r3099) Copy&pasto in r3098 2005-10-29 20:28:43 +00:00
tron 9e957ff80b (svn r3098) static, const, uint -> TileIndex, indentation, bracing, unused return values, ... mostly related to the clone vehicle GUI 2005-10-28 20:04:54 +00:00
tron 47137cefb7 (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
2005-10-23 13:04:44 +00:00