summaryrefslogtreecommitdiff
path: root/train_cmd.c
AgeCommit message (Collapse)Author
2005-01-22(svn r1596) Add some more staticstron
2005-01-22(svn r1594) Convert all undefined parameter lists to (void) and add the ↵tron
appropriate warning flags in the Makefile
2005-01-22(svn r1588) -Fix: [ 1105959 ] coded a workaround in the acceleration code so ↵celestar
that trains don't think they're on a slope while they drive around in a tunnel
2005-01-19(svn r1568) made an enum of train subtypes to make the code more readablebjarni
2005-01-19(svn r1565) -Fix: [ 1104969 ] Aircraft in hangar messages are now ↵celestar
revalidated before display -CodeChange: replaced one if (foo) return true else return false by return (foo)
2005-01-18(svn r1561) Fix: autoreplacing a singleheaded engine into a dualheaded ↵bjarni
engine now adds the the rear engine autoreplacing a dualheaded engine into a singleheaded engine now sells the rear engine as a sideeffect of this, the price for replacing both engines are now added and displayed once from the depot(instead of two identical numbers written on top of each other, looking like one) fix: cost for autorenew dualheaded engines were doubled and their value where doubled too
2005-01-18(svn r1558) -Fix: [ 1104350 ] Crashed trains do not initiate the lost vehicleCelestar
message anymore
2005-01-17(svn r1554) -Fix: [ 1103187 ] Order Check messages are now validated beforecelestar
displayed, so that there are no stray error messages any more. -Feature/Fix: Order Checking is only execute for ONE vehicle in an order-share system
2005-01-17(svn r1550) Remove useless function declarationtron
2005-01-17(svn r1549) Clean up some functions:tron
uint tile -> TileIndex tile if () cascade -> switch ()
2005-01-16(svn r1536) Move GET_TILEHEIGHT, GET_TILETYPE and IS_TILETYPE to map.h, turn ↵tron
them into inline functions and add some asserts
2005-01-15(svn r1525) -Codechange: rewrote the _order_array, now it can be made dynamic.truelight
-Codechange: renamed all 'schedule' stuff to 'order(list)' -Codechange: moved all order-stuff to order_cmd.c / order.h -Codechange: vehicles that share orders are now linked to eachother with next_shared/prev_shared in Vehicle Developers: please use AssignOrder to assign data to an order. If not, you _WILL_ make the save-routine to assert!
2005-01-09(svn r1445) -Fix: reversing a train also reverses the UP and DOWN status for ↵truelight
the realistic acceleration calculation -Fix: there was a big bug in setting the UP and DOWN flags making it easy possible for a overloaded train to go up a mountain. This is no longer possible. They will hang at a certain height
2005-01-07(svn r1414) Move TileIndex, TILE_MASK and GET_TILE_[XY] to map.h and turn ↵tron
the latter into inline functions names Tile[XY]
2005-01-06(svn r1407) -Codechange: changed a lot around _stations, _vehicles, _towns ↵truelight
and _industries (in prepare of dynamic arrays): - DEREF_XXX is changed into GetXXX - All direct call are directed via GetXXX - struct Industry has now an index-field - ENUM'd some stuff - Replaced home built loops with FOR_ALL_XXX - Added _stations_size, _vehicles_size, ... which gives the length of the array (which will be dynamic in the near future) - Changed lengtof(XXX) to _XXX_size (e.g. _stations_size) - Removed all endof(XXX) (because mostly it was part of a FOR_ALL_XXX) - Made the sort-functions of all 4 dynamic - Made all 4 Initialize functions more of the same - Some minor tab-fixing and stuff (tnx to Tron for proof-reading my 100kb patch ;)) Note for all: please do NOT directly call _stations, _vehicles, _towns and _industries, but use the right wrapper to access them. Thank you. Ps: please also do not use 'v++', where v is of type Vehicle *.
2005-01-06(svn r1402) Trim trailing whitespacetron
2005-01-05(svn r1386) Move TileIndexDiff to map.htron
Move _tileoffs_by_dir to map.[ch] and encapsulate it in TileOffsByDir()
2005-01-04(svn r1375) -Fix: [1050990] Buying trains sometimes accounted for ↵darkvater
incorrectly. Was the result of the cost getting reset in a recursive call of docommand. That is fixed. In addition all cost-commands are typed explicitely. Please do not forget to do so or your costs will be credited to construction if you are unlucky.
2005-01-04(svn r1367) -Fix: Full-Loading trains no longer get "lost" after a while ↵matthijs
(Hackykid)
2005-01-02(svn r1323) Adding autoreplace featurebjarni
This feature works much like autorenew, but it will get you a new engine type instead of a new one of the same type. Once ordered, it will automatically replace the engines while they visits a depot. The GUI for setting this up have been added on the vehicle overview windows Note: autorenew is now autoreplace, but to the same engine type Nice new features, that was added to make this possible - windows can now have two independant vertical scrollbars - CMD_SHOW_NO_ERROR have been added as a flag for DoCommandP. It will make it do the action instead of showing the red box with estimated costs even if shift is pressed - fixed problem where enginetypes where not initialized when loading a game. It's now done in InitializeGame()
2004-12-28(svn r1288) -Codechange: changed _map2 to an uint16. It is still saved and ↵truelight
loaded as an uint8 till the savegame version is bumped to version 5. Then it works automaticly as a fully uint16. So _stations[] can not be increased till after the bump!!
2004-12-27(svn r1283) -Add: AutoRenew is now a client-side patch instead of a ↵truelight
game-side patch Note: this is the first commit that breaks compatibility with 0.3.5! -Fix: Bufferoverflow with autorenew_money. It is now a 32-bit integer.
2004-12-21(svn r1211) -Feature: Introduce sticky windows to all vehicle windows...Just ↵darkvater
make sure you do not sticky more than 23 at a time. Also a lot of places in the code invalidated the 'status bar' of the vehicle, referring to it as widget 4. This is now widget 5 and has been #definitized
2004-12-21(svn r1200) -Fix: Fixed bug pointed out by Tron: when a train is on the truelight
road/rail-crossing, and you let an other train drive towards it, reverse it, the lights no longer go off.
2004-12-21(svn r1199) -Fix: [ 958098 ] No longer road/rail crossing signals hang when ↵truelight
a train is reversed at the wrong moment (Yeah, our longest open bug finally fixed :) :) :))
2004-12-21(svn r1198) -Fix: [ 1087701 ] It is no longer possible to crash trains of other truelight
companies by building a depot close to a station. (even more: trains do no longer enter tiles that do not belong to his owner)
2004-12-20(svn r1189) Fix vehicle list update glitch when moving waggons in depotstron
2004-12-19(svn r1167) Feature: Added the possibility to add validation functions to ↵dominik
NewsItems. This is now done for "Train in depot" messages. Before displaying such a message, it checks if the train really still is in the depot. Can be applied to other news items as well.
2004-12-15(svn r1117) Move map arrays and some related macros into their own files ↵tron
map.c and map.h
2004-12-11(svn r1015) MFM r789tron
Replaced the slightly misleading SERVICE_INTERVAL by a function VehicleNeedsService()
2004-12-10(svn r1009) -Feature: per-station vehicle liststron
This adds a little button per vehicle class to the station window which opens a list of all vehicles that have this station on their schedule. As side effect this gets rid of some global variables.
2004-12-09(svn r998) now vehicles are serviced both when entering and when leaving ↵bjarni
depots to prevent that vehicles might need service when leaving after a long stay (ln--)
2004-12-05(svn r955) Replace uint16 for orders with struct Ordertron
This adds no functionality, but is a stepping stone for future improvement (like 16bit order indices) and is easier to read. This changes preserves binary compatibility wrt savegames.
2004-12-04(svn r925) Use sound enumstron
Also play the correct sound when a toyland road vehicle breaks down
2004-12-04(svn r924) Use RailVehInfo() instead of &_rail_vehicle_info[]tron
2004-12-02(svn r901) Small step in the process to clean up the DPARAM mess:tron
- reduce to 2 sizes (*DParam64 for 64bit values, *DParam for the rest) - use inline functions instead of macros - add assert()s to check for buffer overruns
2004-11-25(svn r815) Include strings.h only in the files which need it.tron
This should reduce the compile time after altering english.txt by about 1/3, because "only" 62 instead of 90 .c files must be recompiled.
2004-11-23(svn r785) -Fix: A train can leave and enter the same depot at the same ↵tron
time, then the trai simply got stuck
2004-11-22(svn r773) When refitting a train engine, refit also all the attached wagons ↵pasky
which can be refitted (applicable to DBSetXL, as shown in http://pasky.or.cz/~pasky/dev/openttd/screenshots/wagrefit.png). This is how TTDPatch does it, pointed out by Bjarni.
2004-11-17(svn r654) Hopefully complete support for randomized variational ↵tron
spritegroups (i.e. the cars transporter in DBSetXL gets different cars each time) (pasky)
2004-11-14(svn r607) -Patch: [ 985102 ] static cleanuptron
Thanks to lvoge
2004-11-14(svn r587) -newgrf: Rename all /Checkpoint/i tokens to 'Waypoint's. The name ↵darkvater
actually makes some sense and is also compatible with TTDPatch (pasky).
2004-11-12(svn r546) -newgrf: Use GetCustomVehicleIcon() for fetching sprites for ↵darkvater
vehicle selection dialogs. (Idea by octo, done by pasky).
2004-11-05(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunktron
This includes 2 fixes -Fix: [1048596] Monorail and Maglev sounds are swapped (r511) -Add special case to load the jackhammer sound (r478) The rest are cleanups und enumeration to make merging possible/easier
2004-09-23(svn r314) -Fix: [982611] Pathfinding bug; train likes the roundabout. If ↵darkvater
train needs servicing it will now look 16 tiles along the track instead of 12 tiles manhattan style (blathijs)
2004-09-21(svn r306) -Fix: [985439] un-owned rail. Trains could cross competitor's ↵darkvater
tracks if there was a road-crossing over it.
2004-09-18(svn r294) -Fix: autorail always builds rail, instead of occasional rail ↵darkvater
removal (on pressing hotkey after pressing 'bulldozer') -Fix: network fixes (Tron) -Some textfile changes, mainly URL's
2004-09-14(svn r245) -Fix: [1022689] Bug when dragging a part of a multiheaded engine ↵darkvater
to 'sell-whole-train'. The rear-head of the multiheaded train will now not be sold automatically. You have to drag it manually (Celestar)
2004-09-14(svn r243) -Fix: [1022689] When destroying a part of a train with a 2 side ↵signde
engine the second engine was also deleted [Celestar]
2004-09-10(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!truelight