summaryrefslogtreecommitdiff
path: root/ai_new.c
AgeCommit message (Collapse)Author
2005-07-22(svn r2673) Include functions.h directly, not globally via openttd.htron
2005-07-17(svn r2606) -Codechange: renamed ai.c to ai_old.c, and ai.h to ai_new.h to ↵truelight
make room for a global AI-handler
2005-07-13(svn r2558) Change the internal map format from 7 arrays to one array of ↵tron
structs, this doesn't change the saved format for now. It's a stepping stone for further changes.
2005-06-25(svn r2487) Replace TILE_XY by TileXY/TileDiffXYtron
2005-06-04(svn r2407) Use {Get,Is}TileOwner to get/check the owner of a tile and fix ↵tron
some bogus reads of _map_owner
2005-06-02(svn r2397) - CodeChange: rename all "ttd" files to "openttd" files.Darkvater
2005-05-06(svn r2271) CMD_SET_PLAYER_FACE, CMD_SET_PLAYER_COLOR, CMD_INCREASE_LOAN, ↵tron
CMD_DECREASE_LOAN only make sense for the current player, so don't explicitly pass a player number
2005-04-20(svn r2217) - Fix: [ 1184201 ] AI orders its vehicles to a competitor's ↵Darkvater
truck stop. Added a CmdFailed() check to all command returns of the AI instead of the simple == / != CMD_ERROR check. This should fix the problem.
2005-03-11(svn r1994) Fix: 1159456 - hopefully prevent the new AI to get stuck in an ↵pasky
infinite loop forlorny trying to build its haven. Unintentionally bundled with trivial tidyup.
2005-02-17(svn r1881) -Fix: [ 1119308 ] Max passengers / mail variables are now 32 bitcelestar
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 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-02-05(svn r1803) Move debugging stuff into files of it's owntron
2005-02-01(svn r1764) -Add: dynamic towns, you can now have up to 64k towns (let me ↵truelight
know when you have that amount of towns in a map ;))
2005-01-31(svn r1757) Stop the new AI from trying to build its HQ on non-existent tilestron
2005-01-31(svn r1749) Move the functions which calculate distances to map.[ch] and ↵tron
give the more meaningful names
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-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-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-05(svn r1386) Move TileIndexDiff to map.htron
Move _tileoffs_by_dir to map.[ch] and encapsulate it in TileOffsByDir()
2004-12-29(svn r1297) Language fixes in the source.. (ln-)miham
2004-12-15(svn r1117) Move map arrays and some related macros into their own files ↵tron
map.c and map.h
2004-12-08(svn r979) Allow more realistically sized catchment areasCelestar
2004-12-05(svn r960) -Fix: forgotten conversion of orders for the AI (Tron)darkvater
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-03(svn r920) Replace vehicle info macros with inline functions and add asserts ↵tron
to check limits
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-13(svn r562) newgrf: Merge most of the road vehicle info to a singlecelestar
road_vehicle_info table, like it already is for trains and ships. Needed for GRF custom override support. (pasky)
2004-09-06(svn r166) -Codechange: change 74 for constant DAY_TICKSdarkvater
2004-09-01(svn r147) -Fix [NewAI]: small fix for road-building when RoadQueueing is ↵truelight
disabled
2004-08-31(svn r146) -Fix [AI]: Tunnel/bridge bugtruelight
-Fix [AI]: Minor problems -Add [AI]: Profit check (if not making enough money, vehicles are sold)
2004-08-22(svn r111) -Fix: converted all linebreaks to UNIX-linebreak (\n)truelight
2004-08-20(svn r96) -Fix: [AI] An industry can have no town, which caused crashestruelight
2004-08-20(svn r94) -Fix: AI crash bug (blathijs)truelight
2004-08-20(svn r85) -Add: initial commit of new AI (enable in Patch menu)truelight
-Add: generalised A* Algorithm -Add: generalised queues (Fifo, Stack, InsSort, BinaryHeap)