Commit Graph

29 Commits

Author SHA1 Message Date
tron
4bf173e9c1 (svn r1981) Typedef some structs and enums 2005-03-10 07:01:43 +00:00
tron
4325f13f74 (svn r1928) Miscellaneous cleanups (data types, whitespace, const correctness) 2005-03-05 18:44:26 +00:00
celestar
d449145799 (svn r1872) -Fix: Fixed an inline problem which caused MSVC6 to not compile :/ 2005-02-13 21:51:47 +00:00
matthijs
c5c5c9b17c (svn r1834) - Fix: NPF does not check the owner of its target, busses try to 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 22:36:08 +00:00
truelight
10adda0d73 (svn r1788) -Add: Made RoadStops dynamic. You can now create up to 64k roadstops. 2005-02-04 15:31:30 +00:00
truelight
1938a73c90 (svn r1776) -Add: Dynamic stations. You can now have up to 64k of stations 2005-02-03 17:22:35 +00:00
truelight
ab3ed5c431 (svn r1770) -Fix: Hopefully last pieces of code that are containing a station-id
(and should be an uint16, not uint8)
2005-02-02 16:16:43 +00:00
matthijs
a2dec6c32a (svn r1751) - Feature: New PathFinder (NPF).
- 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 11:23:10 +00:00
celestar
752b3f0dd6 (svn r1721) -Feature: It is now possible to build multiple road stations (up to 8) on
a single station.
Thanks to: Truelight for the saveload code, Darkvater and Hackykid for
network testing and Tron for proof-reading 1500 lines of diff.
2005-01-29 19:41:44 +00:00
tron
189ca73707 (svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile 2005-01-22 20:23:18 +00:00
truelight
d275109e79 (svn r1525) -Codechange: rewrote the _order_array, now it can be made dynamic.
-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-15 19:06:22 +00:00
truelight
63e97754fb (svn r1407) -Codechange: changed a lot around _stations, _vehicles, _towns 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 22:31:58 +00:00
tron
8b7c1e94e1 (svn r1402) Trim trailing whitespace 2005-01-06 18:45:28 +00:00
Celestar
5b0743d66b (svn r979) Allow more realistically sized catchment areas 2004-12-08 15:46:13 +00:00
tron
3a7abc2a35 (svn r659) Support for cutomized TTDPatch-style new stations (no selector GUI yet) (pasky) 2004-11-17 18:03:33 +00:00
miham
86d19cb577 (svn r647) Cleanup custom station classes handling. (pasky) 2004-11-17 00:52:54 +00:00
darkvater
183c33931d (svn r605) -newgrf: Framework for supporting variational spritegroups . 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 18:18:28 +00:00
darkvater
e656a91736 (svn r602) -newgrf: Move DrawTileSeqStruct & co and struct SpriteGroup to sprite.h (pasky) 2004-11-14 16:42:08 +00:00
darkvater
5fcd71cf28 (svn r600) -newgrf: Relocation offset for custom station sprites is now stored separately, making it possible to show different sprites in waypoint selection dialog (pasky). 2004-11-14 16:11:48 +00:00
darkvater
5847317526 (svn r592) -newgrf: Dynamically allocate global custom station IDs (pasky). 2004-11-14 14:53:15 +00:00
darkvater
ccc496ba2c (svn r591) -newgrf: Store whole struct StationSpec in SetCustomStation(), not just the rendering data. This will be needed for variational stationspecs (pasky). 2004-11-14 14:10:03 +00:00
darkvater
989289fadd (svn r585) -newgrf: GUI for selecting custom waypoint graphics to use. Patch by dominik81 and pasky. 2004-11-14 11:04:59 +00:00
celestar
eb50427670 (svn r581) -newgrf: Basic support for new stations - only waypoints 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-14 09:07:15 +00:00
darkvater
7930faace9 (svn r576) -newgrf: Cleanup horrible table/(station|unmovable)_land.h DrawTileSeqStruct hacks needed for custom station supports (pasky) 2004-11-14 01:25:05 +00:00
darkvater
c79e8ad626 (svn r244) -Fix: Stations were not sorted for non-player-0 players
-Fix: Correctly resorting vehicle list of player when the list of another player is open.
2004-09-14 14:19:53 +00:00
truelight
eb49a19460 (svn r194) -Codechange: stripping trailing-spaces. Please keep this that way! 2004-09-10 19:02:27 +00:00
dominik
74852c4652 (svn r124) Prepared code for removal of block_months variable in next major savegame version 2004-08-23 21:29:25 +00:00
dominik
43d691df17 (svn r56) Improved order checker + patch setting for it (celestar) 2004-08-15 13:21:18 +00:00
truelight
efaeb275f7 (svn r1) Import of revision 975 of old (crashed) SVN 2004-08-09 17:04:08 +00:00