summaryrefslogtreecommitdiff
path: root/map.c
AgeCommit message (Collapse)Author
2006-05-02(svn r4688) - Ensure the map memory is cleared after it is allocated. This ↵peter1138
fixes random deserts that sometimes occurred.
2005-10-22(svn r3077) static, const, bracing, indentation, 0 -> '\0'/NULL, typos in ↵tron
comments, excess empty lines, minor other changes nothing spectacular, just some stuff, which piled up
2005-10-02(svn r3008) [ 1247535 ] Native Support for Win64 (compile&run only) (michi_cc)Darkvater
Fix warning in graph_gui.c with const problem
2005-09-09(svn r2929) * Move DistanceTrack from map.c to npf.c and rename to ↵matthijs
NPFDistanceTrack. * Make NPFDistanceTrack return the distance multiplied by NPF_TILE_LENGTH to prevent rounding This should make ship and train pathfinding more accurate and faster. * Update IsEndOfLine to prevent trains from trying to go off a slope onto a tunnel entrance.
2005-07-24(svn r2701) Insert Id tags into all source filestron
2005-07-21(svn r2669) Shuffle some more stuff around to reduce dependenciestron
2005-07-13(svn r2560) Fix: various minor code changes.ludde
Added RandomTile/RandomTileSeed functions to generate a random tile. Changed landscape routines so they don't assume that the Y map side is a power of two. (support for this is not complete, though) Changed some frequently used map macros to not compute the values each time. Silence some warnings on MSVC.
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-07-12(svn r2552) - Fix: [map] Fix so the code compiles correctly and doesn't ↵ludde
crash on MSVC6 in optimization mode.
2005-07-08(svn r2533) Move misplaced parenthesis, found by luddetron
2005-06-25(svn r2487) Replace TILE_XY by TileXY/TileDiffXYtron
2005-06-02(svn r2397) - CodeChange: rename all "ttd" files to "openttd" files.Darkvater
2005-04-11(svn r2181) - Add: DistanceTrack() to calculate the distance over optimally ↵matthijs
laid out tracks. - Codechange: [NPF] Removed unused heuristic function NPFCalcTileHeuristic(). - Codechange: [NPF] Use DistanceTrack() instead of DistanceManhattan() for ship and train heuristic. - Codechange: Renamed variables x and y to dx and dy in some of the distance calculation functions.
2005-02-26(svn r1914) - Fix: [ 1119147 ] Stop startup memory corruption crash using ↵Darkvater
optimized MSVC6. MSVC6 workaround as it's too stupid again for its own good
2005-02-05(svn r1803) Move debugging stuff into files of it's owntron
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-31(svn r1748) Enforce map size limitstron
2005-01-30(svn r1737) Add DEBUG category "map" and use it to print the map size when ↵tron
allocating the map
2005-01-29(svn r1722) -Feature: Bigger maps - anyone?tron
2005-01-28(svn r1706) Implement ScaleByMapSize() and ScaleByMapSize1D()tron
These scale a number relative to the map size/circumference. Use them to scale the amount of map objects. Of course at the moment they return just the input, because there are no bigger/smaller maps yet.
2005-01-09(svn r1449) -Fix: signed/unsigned error on windowsdarkvater
-Change: Makefile added -Wsign-compare flag
2005-01-09(svn r1447) Move TILE_ADD(), TILE_ADDXY() and SafeTileAdd() to map.[ch] and ↵tron
make the latter map size agnostic
2005-01-07(svn r1415) Move TILE_FROM_XY and TILE_XY to map.h and push TILE_[XY] bits ↵tron
from map.h into map.c. Now the whole source except map.c is independent of TILE_[XY]_BITS!
2005-01-06(svn r1396) Introduce TileIndexDiffC - the compile time version of TileIndexDifftron
2005-01-05(svn r1386) Move TileIndexDiff to map.htron
Move _tileoffs_by_dir to map.[ch] and encapsulate it in TileOffsByDir()
2005-01-03(svn r1344) Use MapSize[XY]() (or MapSize()/MapMax[XY]() where appropriate) ↵tron
instead of TILES_[XY]
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-16(svn r1130) Add helper functions to query map sizetron
2004-12-15(svn r1117) Move map arrays and some related macros into their own files ↵tron
map.c and map.h