summaryrefslogtreecommitdiff
path: root/rail_cmd.c
AgeCommit message (Collapse)Author
2005-03-10(svn r1981) Typedef some structs and enumstron
2005-02-22(svn r1903) Replace some casts and macro magic with proper typing, similar ↵tron
to r1902
2005-02-13(svn r1867) Include tables/sprites.h only in files which need ittron
2005-02-06(svn r1834) - Fix: NPF does not check the owner of its target, busses try to ↵matthijs
enter other players' depots. TODO - Add: asserts to find the v->u.rail.track == 0 problem. - Add: IsValidDepot(), IsValidTown(), IsValidSign(), IsValidVehicle(), IsValidStation() - Add: GetTileOwner(), IsTileOwner() - Codechange: Replaced IsShipDepotTile(), IsTrainDepotTile(), IsRoadDepotTile() by IsTileDepotType(). - Codechange: typedeffed the MAP_OWNERS as Owner. Should be used as variable type. - Codechange: Replaced a few uint by TileIndex.
2005-02-06(svn r1832) Next byte -> char iteration: custom namestron
2005-02-06(svn r1817) -Codechange: Moved depot-functions to depot.ctruelight
-Codechange: Added wrappers around depot-access (GetDepot no exists) -Codechange: Made depot-functions a bit more logic (no longer GetDepotByTile crashes your game when you request it on a non-depot tile) -Add: made depots dynamic (yes, 64k depots are possible now)
2005-01-31(svn r1751) - Feature: New PathFinder (NPF).matthijs
- Supports trains, road vehicles and ships. - Uses A* pathfinding (same codebase as the new ai). - Currently unlimited search depth, so might perform badly on large maps/networks (especially ships). - Will always find a route if there is one. - Allows custom penalties for obstacles to be set in openttd.cfg (npf_ values). - With NPF enabled, ships can have orders that are very far apart. Be careful, this will break (ships get lost) when the old pathfinder is used again. - Feature: Disabling 90 degree turns for trains and ships. - Requires NPF to be enabled. - Ships and trains can no longer make weird 90 degree turns on tile borders. - Codechange: Removed table/directions.h. - table/directions.h contained ugly static tables but was included more than once. The tables, along with a few new ones are in npf.[ch] now. Better suggestions for a location? - Fix: Binary heap in queue.c did not allocate enough space, resulting in a segfault. - Codechange: Rewritten FindFirstBit2x64, added KillFirstBit2x64. - Codechange: Introduced constant INVALID_TILE, to replace the usage of 0 as an invalid tile. Also replaces TILE_WRAPPED. - Codechange: Moved TileAddWrap() to map.[ch] - Add TileIndexDiffCByDir(), TileIndexDiffCByDir(). - Codechange: Moved IsTrainStationTile() to station.h - Add: IsRoadStationTile() and GetRoadStationDir().
2005-01-31(svn r1749) Move the functions which calculate distances to map.[ch] and ↵tron
give the more meaningful names
2005-01-30(svn r1733) - Fix: oops "| 1" is SETBIT(x, 0), not 1 :(. Now you can remove ↵darkvater
signals again
2005-01-30(svn r1731) - Fix: [ 1106930 ] BugFix: placing signals with 2x1 drags ↵darkvater
workaround is completely rewritten. Also features checks for hacked/modified clients. Thanks a lot Hackykid!
2005-01-29(svn r1713) Split off several functions which query/set information about a ↵tron
single tile from map.h and put them into a seperate file tile.h
2005-01-23(svn r1624) -Fix: [1106930] BugFix: placing signals with 2x1 drags is ↵darkvater
treated as placing a single signal thus providing an easy fix for a nasty problem.
2005-01-23(svn r1610) Remove trailing whitespace (last time ever, i hope)tron
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 r1585) Rewrite CmdBuildSignals()tron
This addresses several issues: - Correct comments - Check input parameters for validity (and don't assert() them) - Reorder checks if action is possible to produce more meaningful error messages - Correct bug where money was charged for an action which should be free - Kill warning about uninitialized variable, because the variable exists no more - Make more clear how the function works (at least i hope so)
2005-01-19(svn r1567) -Fix: [110452] On horizontal/vertical tracks you are also ↵darkvater
charged for building/removing signals on the parallel track on the same tile. Signal updating is also correct. (Hackykid)
2005-01-18(svn r1560) Introduce SetTileType() and SetTileHeight()tron
Replace direct references to _map_type_and_height with these
2005-01-16(svn r1542) Rename TileHeight to TilePixelHeight, because this is what it ↵tron
actually returns
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-14(svn r1508) Remove duplicate declarations and include proper headers where ↵tron
necessary
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-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.
2004-12-29(svn r1297) Language fixes in the source.. (ln-)miham
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-15(svn r1117) Move map arrays and some related macros into their own files ↵tron
map.c and map.h
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 r942) -Merged branch/network back into the trunktruelight
2004-12-04(svn r925) Use sound enumstron
Also play the correct sound when a toyland road vehicle breaks down
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 r787) Invert the sense of the DO_TRANS_BUILDINGS flag to be consistent ↵tron
with its own name and all other DO_* flags. Now it is active-true.
2004-11-21(svn r724) Remove restriction that a tile can only accept 3 cargo types.tron
This especially enables houses to accept passengers, mail, goods AND food. Add string templates for up to 5 cargo types for the tile info window. If more are needed just add them. Simplify (de-uglify) the logic for cargo acceptence for houses and split the goods/food table into two. The acceptance is unmodified, but accepting goods AND food is now trivially possible. The exact amounts have to be decided. This is based on Celestar's changes in the map branch plus some further bits that will be merged there soon.
2004-11-17(svn r657) Do not touch 0x8000 bit in sprite index for custom waypoints. (pasky)celestar
2004-11-17(svn r647) Cleanup custom station classes handling. (pasky)miham
2004-11-14(svn r614) [newgrf] Some minor code fixesdominik
2004-11-14(svn r612) [newgrf] Fix: custom waypoints on monorail/maglev are displayed ↵dominik
correctly
2004-11-14(svn r610) -newgrf: Support for some basic deterministical spritegroups ↵darkvater
regarding stations. Waypoints look changes based on year now :^) (pasky).
2004-11-14(svn r609) Fixed choose waypoints dialogs, it works without assertion ↵dominik
failures and with custom waypoint #0 selectable now. (pasky)
2004-11-14(svn r608) [newgrf] enabled possibility to build default waypoint when ↵dominik
custom waypoints are enabled
2004-11-14(svn r607) -Patch: [ 985102 ] static cleanuptron
Thanks to lvoge
2004-11-14(svn r605) -newgrf: Framework for supporting variational spritegroups . ↵darkvater
Deterministic only at the moment, but random ones support shouldn't be that difficult now It doesn't do anything, but makes these actions actually possible (pasky).
2004-11-14(svn r602) -newgrf: Move DrawTileSeqStruct & co and struct SpriteGroup to ↵darkvater
sprite.h (pasky)
2004-11-14(svn r600) -newgrf: Relocation offset for custom station sprites is now ↵darkvater
stored separately, making it possible to show different sprites in waypoint selection dialog (pasky).
2004-11-14(svn r591) -newgrf: Store whole struct StationSpec in SetCustomStation(), ↵darkvater
not just the rendering data. This will be needed for variational stationspecs (pasky).
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-14(svn r585) -newgrf: GUI for selecting custom waypoint graphics to use. Patch ↵darkvater
by dominik81 and pasky.
2004-11-14(svn r581) -newgrf: Basic support for new stations - only waypoints ↵celestar
supported now and only the first custom one can be placed (no selector GUI, coming soon). This also moves some global variables to {struct GRFFile} and reorders which actions are processed in what stage, to get it all working together -- (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