summaryrefslogtreecommitdiff
path: root/vehicle_gui.c
AgeCommit message (Collapse)Author
2005-11-26(svn r3239) - Codechange: Introduce and use helper functions for engine ↵peter1138
replacement code.
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-07(svn r3155) -Feature: [autoreplace] autoreplace can now remove cars from too ↵bjarni
long trains -Trains will now remember the length of stations it visits and sell cars when being autoreplaced if they became too long -If it needs to remove cars, then it starts from the front and sells all it can find until the train is short enough -This only works for trains, that knows the station length of the route so a full uninterrupted run is needed -a train needs 1-2 runs to detect if the shortest station is expanded -This feature can be turned on and off in the train replace window and each company can have it's own setting -NOTE: minor savegame version bump
2005-11-06(svn r3148) -NewGRF, Feature: Add support for cargo refitting specification ↵peter1138
by cargo classes.
2005-10-30(svn r3106) -Autoreplace feature: Continue to show old vehicles in replace ↵peter1138
window after all player's vehicles of that type have been replaced. This allows the replacement to be removed. These vehicles are shown in grey instead of the player's colour.
2005-10-25(svn r3089) Fix possible issue with out-of-bounds array access in replace ↵peter1138
vehicle gui, and add brief commenting.
2005-10-24(svn r3082) made ChangeVehicleViewWindow() more readable (added in last commit)bjarni
2005-10-24(svn r3081) -Codechange: [autoreplace] complete rewrite of autoreplacebjarni
this is a complete rewrite, that makes use of existing commands like build and sell this means that multiheaded train engines are replaced correctly
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-18(svn r3059) Use bitfields to encode railtype and climates of engines instead ↵tron
of manual shifting/anding
2005-10-16(svn r3049) Replace byte/int/uint by RailType where appropriatetron
2005-10-16(svn r3048) Replace 0/1/2 by RAILTYPE_RAIL/MONO/MAGLEV where appropriatetron
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
2005-09-26(svn r2988) static where static is duetron
2005-09-23(svn r2974) -Fix: Drag and drop selection on drop down boxes didn't select ↵peter1138
correct item when some items were hidden. -Separate disabled and hidden masks in drop downs to support both hidden and disabled items.
2005-09-18(svn r2962) - const correctness for all Get* functions and most Draw* ↵Darkvater
functions that don't change their pointer parameters - change a lot of byte player types to PlayerID - beautify header files, same "#endif /* filename */" ending
2005-08-29(svn r2901) Refix 'replace window' with wrong string-etc. coordinates. Also ↵Darkvater
clean up, and make window-title a bit more meaningful (specify vehicle type replaced)
2005-08-20(svn r2880) Fix graphical glitch in replace window (text at wrong coordinates)Darkvater
2005-08-06(svn r2817) -Codechange: [autoreplace]: moved autoreplace and autorenew to ↵bjarni
serverside -This means that one company can only have one setting for renew and replacing more clients will not fight due to different settings anymore -This is a needed step in the line to fix autoreplacing dualheaded locomotives NOTE: savegame revision bump (peter1138 + me in coop)
2005-08-05(svn r2812) Move variables, which only vehicle_gui.c needs to know about, theretron
2005-07-27(svn r2724) -Fix: [Autoreplace] made the pulldown menu read ↵bjarni
GetPlayer(_local_player)->avail_railtypes - this removes the need for updating this code if we add more railtypes and it also allows the menu to show maglev when monorail is not available
2005-07-24(svn r2701) Insert Id tags into all source filestron
2005-07-22(svn r2673) Include functions.h directly, not globally via openttd.htron
2005-07-21(svn r2669) Shuffle some more stuff around to reduce dependenciestron
2005-07-21(svn r2664) Remove depedency on player.h from variables.htron
2005-06-07(svn r2432) Use GetEngine() instead of DEREF_ENGINE() or even _engines[]tron
2005-06-07(svn r2429) - Fix: Oops, forgot to increase the size of the autoreplace ↵hackykid
window to fit the extra info from powered wagons.
2005-06-05(svn r2413) - Codechange: Rewrite the displaying of purchase details a bit, ↵hackykid
make it easyer to add lines later. - Add: In the purchase details for trains display "(refittable)" after the capacity if the vehicle is refittable.
2005-06-02(svn r2397) - CodeChange: rename all "ttd" files to "openttd" files.Darkvater
2005-05-26(svn r2365) - Change: [refitting] Make refitting capacities for trains ↵hackykid
newgrf compatible. Train vehicles can now carry twice as much mail/goods as other cargo, and four times as much passengers. - Fix: [refitting] The refit window now shows the correct refit options for the entire consist. Only if at least one of the vehicles in the train can be refitted to a certain cargo, it is shown in the list. - Fix: [refitting] When refitting to a cargo which is already carried by some vehicles in the consist, the capacities of those vehicles are taken into account when calculating the new capacity of the train in the refit window.
2005-05-14(svn r2306) - CodeChange: Check the last commands; refits. This needed an ↵Darkvater
extensive rewrite and global/local-cargo ID juggling and bitmasking. However with this done it looks better as well and is compatible with newgrf handling. Big thanks to HackyKid for doing most of the work. This also closes patch "[ 1199277 ] Command checks"
2005-05-04(svn r2267) - Codechange: Reverted the typedeffing of VehicleType (r2256), ↵matthijs
since that interfered with the saveload code.
2005-05-02(svn r2256) - Fix: Trains cannot find a depot when they are in a tunnel. (glx)matthijs
- Add: GetVehicleTrackdir() helper function. - Codechange: Moved SortStruct from vehicle_gui.h to ttd.h, so the dependency from vehicle.h on vehicle_gui.h could be removed. - Codechange: Typedeffed the VehicleTypes struct so it can be used as the type for Vehicle.type instead of "byte". - Codechange: Removed prototype for VehicleSorter(), which had no implementation anymore and was never called.
2005-04-13(svn r2192) - Add greater control to the 'message options' window. Now you ↵Darkvater
can turn off the telegraphc ticker sound for summarized messages, or turn off news-messages altogether (you get a red blot to notify you though). The [<][>] set the settings in one way, while clicking on the option itself, cycles it. This commit also 'fixes' bugs [1166973], [1121484] and patch [1169930]. - I also changed an order of strings from On, Off to Off, On, so this can be used ingame with the WWT_4 widget type. - Since the newssettings now take 2 bits per setting (off/summary/on) _news_display_opt is widened to 32 bits and the settings code changed slightly to accomodate for a maximum of 16 message-types.
2005-03-08(svn r1969) - GUI: Replace vehicle dropdown menu now looks a bit more ↵Darkvater
comform the ones used throughout the game.
2005-03-08(svn r1966) - Fix: [ 1110437 ] Replace Vehicles GUI gets random clicks. ↵Darkvater
Breaks people! Don't forget the breaks in switch() statements!!
2005-02-13(svn r1867) Include tables/sprites.h only in files which need ittron
2005-02-06(svn r1813) Declare functions implemented in strings.c in their own shiny ↵tron
new header (though i think some of these function don't belong into strings.c)
2005-02-05(svn r1803) Move debugging stuff into files of it's owntron
2005-02-04(svn r1798) GetFoo(i)->index is per definition i, so replace the former with ↵tron
the latter
2005-02-04(svn r1783) -Add: Dynamic vehicles (now up to 64k of vehicles)truelight
2005-01-31(svn r1750) - Feature: [ 1093261 ] Saving vehicle sorting criteria for each ↵darkvater
vehicle type (bociusz)
2005-01-27(svn r1695) -Fix: I broke maximum speed sorting for anything but trains with ↵Celestar
the new acceleration. Sorry
2005-01-26(svn r1684) - Fix: [autoreplace] made sure that planes only show planes in ↵bjarni
replace GUI and helicopters only show helicopters
2005-01-26(svn r1681) -Feature: New realistic acceleration.celestar
This will make things more difficult as narrow curves and depots impose rather strict speed limits. Feedback welcome For those who don't like low-speed curves: Switch it off
2005-01-26(svn r1680) Feature: Replace train GUI now remembers the railtype selected ↵bjarni
in the dropdown menu
2005-01-26(svn r1679) Fix: dropdown menus now returns the index of the string that was ↵bjarni
clicked even if a previous item is hidden This bug was not triggered by the current code, but it's easier to code new features if you do not have to think about such limitations like you can't hide an item in the middle of the list ;)