bjarni
ce24a73673
(svn r6239) -Code cleanup: cleaned up PlayerVehWndProc
...
code to delete an empty shared orders list is now much simpler
cleaned up the code to handle button clicks
fixed an assert if widget 9 was pressed on a list with vehicles for another company
2006-08-30 16:32:00 +00:00
bjarni
c820704f11
(svn r6227) -Codechange: added window type flags to use with PlayerVehWndProc
...
this makes the list type detection much easier and allowed an if cascade to be turned into a switch case
this also makes it easier to add more list types
2006-08-29 21:36:39 +00:00
bjarni
ecf8edf033
(svn r6215) -Codechange: [vehicle list windows] unified Player(vehicle)WndProc into PlayerVehWndProc
...
Those 4 unified functions were really much alike, so there was no reason to have so much dublicated code
2006-08-29 17:41:13 +00:00
tron
38d34d3def
(svn r6208) Reduce the number of induction variables for clarity
2006-08-29 06:03:26 +00:00
belugas
1f660a8175
(svn r6205) -CodeChange : use a switch case instead of a cascade of if
...
-CodeChange : rename var Engine *e to Engine *eng, since we have WindowEvent *e in same fnct
-CodeChange : fix a broken tabulation on a switch case. SOme breathing spaces too
2006-08-29 00:17:47 +00:00
rubidium
86dc219b4b
(svn r6204) -Cleanup: replace non-indentation with spaces; like '}<TAB>else {' -> '} else {', tabs between code and comment, etc.
2006-08-28 18:53:03 +00:00
bjarni
2930781bea
(svn r6182) -Code cleanup: replaced one (1 << 8) with SHARE_FLAG (missed in r6167)
2006-08-28 06:18:35 +00:00
bjarni
19cd783979
(svn r6181) -Fix r6161: The list of vehicles using a certain station got a bit of display code mixed up with the list of vehicles with shared orders (nycom)
2006-08-28 06:13:16 +00:00
bjarni
3af65b79e7
(svn r6167) -Code cleanup r6161: replaced some uint16 with OrderID and (1 << 8) with SHARE_FLAG
2006-08-27 09:55:54 +00:00
bjarni
422d073910
(svn r6165) -Feature: control click Goto Depot will now make the vehicle service
...
at the depot and leave right away.
To tell the difference the status of stopping vehicles will be in red,
while servicing vehicles will be green.
-Codechange: remove some dead code in CmdSendAircraftToHangar() since it is
conflicting with new functionality. Now p2 means the same for all types
2006-08-27 09:28:52 +00:00
bjarni
f938db6619
(svn r6161) -Feature: List of vehicles with the same shared orders
...
the list is available in the orders window and looks like the list buttons from the station windows (small vehicle)
The button is disabled if the vehicle do not have any shared orders or it got shared orders, but an empty order list
based on a patch by nycom, thought it ended up getting heavily modified
Thanks to TrueLight for proofreading and suggestions
2006-08-26 22:28:40 +00:00
truelight
65f5ec13f6
(svn r6142) -Codechange: added WaypointID (sorry DV, couldn't splits it anymore)
...
-Codechange: introduced DestinationID, which is in fact an union of several types
Used in Order struct, so no longer StationID is abused for all targets.
Hangars are a big exception, as they use a station-id with GOTO_DEPOT (go figure)
2006-08-26 16:34:03 +00:00
belugas
650b9be724
(svn r6046) CodeChange : Rename WWT_5 Widget type to WWT_LABEL : a centered label
...
CodeChange : Move almost all fixed strings from ON_PAINT event to Widget array using WWT_LABEL.
Feature : All "Select Refit Cargo" are now centered, instead of been left aligned
2006-08-22 15:23:25 +00:00
rubidium
908d3bcfe6
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
2006-08-22 14:38:37 +00:00
rubidium
db397d5a75
(svn r6002) -Cleanup: remove the now redundant BASE_YEAR constant.
2006-08-20 19:05:28 +00:00
truelight
d3f2180438
(svn r5944) -Merge TGP (r5578, r5579, r5724, r5726): -Feature: filter for textboxes to only
...
allow certain patterns (like numbers only)
2006-08-19 09:31:22 +00:00
rubidium
e87e065e41
(svn r5926) -Codechange: make _cur_year contain the full year, instead of 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
2006-08-16 11:39:55 +00:00
rubidium
7d2ceb2063
(svn r5918) -Cleanup: rename ConvertDayToYMD/ConvertYMDToDay as they really convert a Date to/from a YearMonthDay.
...
-Cleanup: swap ConvertDateToYMD's parameters to make the order consistent with the name of the function.
2006-08-15 16:49:48 +00:00
rubidium
c55962f8a2
(svn r5916) -Cleanup: use MIN_YEAR/MAX_YEAR for the year boundaries and BASE_YEAR when comparing _cur_year with a 'full' year.
...
-Cleanup: replace some magic '1920' values with BASE_YEAR.
2006-08-15 15:18:03 +00:00
Darkvater
b293c7a4e1
(svn r5910) Fix some more warnings on MSVC by using (void*) casts. Followup of r5907.
2006-08-15 09:28:27 +00:00
tron
bdb843950a
(svn r5894) Remove a totally unnecessary indirection in the vehicle sorter code. Less code, less data, simply better
2006-08-14 20:25:29 +00:00
rubidium
9fc837ad85
(svn r5887) -Cleanup: move date related functions, defines and variables to date.[ch]
...
-Cleanup: fix whitespace related coding style issues in date.[ch]
-Cleanup: make original comments doxygen compatible and remove/change outdated comments
2006-08-14 14:21:15 +00:00
belugas
f1968d236c
(svn r5839) Fix : A ship in a depot must be stopped before allowed to be cloned.
...
As this is standard behaviour for all other vehicle types...
2006-08-11 03:07:46 +00:00
peter1138
acaa043d6f
(svn r5820) - NewGRF: Add support for extra vehicle text in the purchase list for road vehicles, aircraft and ships.
2006-08-09 21:02:06 +00:00
belugas
40a8964911
(svn r5609) CodeChange : Apply coding style
2006-07-26 03:33:12 +00:00
tron
772fbda3e3
(svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectacular
2006-06-27 21:25:53 +00:00
tron
8cae4d1214
(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
a2362674e3
(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
peter1138
bbafbc2942
(svn r5188) - NewGRF: check refit capacity callback when refitting a ship
2006-06-09 07:09:48 +00:00
tron
ce9639c6bc
(svn r5120) Add IsShipInDepot{Stopped,}() and remove some redundant checks
2006-06-05 11:28:00 +00:00
tron
9ee944cabb
(svn r5094) Remove _new_{aircraft,roadveh,ship,train,wagon}_id. _new_vehicle_id is enough.
2006-06-04 09:28:33 +00:00
tron
d9e968e759
(svn r4943) uint tile -> TileIndex tile, byte player -> PlayerID player
2006-05-21 16:18:58 +00:00
tron
e774caca2a
(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
28318a6cbd
(svn r4709) - Codechange: avoid messing around with globals, magic numbers and literal strings by using a string ID, when drawing the small right arrow for the small order lists (aircraft and ships)
2006-05-03 14:22:59 +00:00
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()
2006-04-10 07:15:58 +00:00
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.
2006-04-08 12:04:23 +00:00
tron
8cfcdaa733
(svn r3783) Replace further ints and magic numbers by Direction, DiagDirection and friends
2006-03-08 06:55:33 +00:00
peter1138
97559a9df9
(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
b5cd24f05d
(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
6c28b1cec7
(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
tron
17ec6ed70d
(svn r3520) Remove unused parameters from some functions
2006-02-02 07:15:46 +00:00
tron
1c3e8630fe
(svn r3511) More whitespace ([FS#46] by Rubidium)
2006-02-01 07:36:15 +00:00
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
2006-01-05 21:35:54 +00:00
tron
24d56f889d
(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
cac82aa4af
(svn r3350) Fix widget glitch in player ship window (missed in r1379)
2005-12-28 09:29:00 +00:00
tron
28b8b7e269
(svn r3300) Remove unreachable code - in this case some duplicate breaks
2005-12-14 06:49:54 +00:00
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.
2005-12-07 15:48:52 +00:00
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
2005-11-14 19:48:04 +00:00
tron
81e5b16d71
(svn r3172) static, const
2005-11-13 13:43:55 +00:00
tron
4caa0e593d
(svn r3099) Copy&pasto in r3098
2005-10-29 20:28:43 +00:00