|
belugas
|
r5118:39d089581803
|
18 years ago
|
|
(svn r7198) -Codechange: Implement a circular tile search function. Just provide the number of tiles per side, a pointer to a test function, the tile to start searching and voila. Fixes [FS #364] by removing a lengthy and suboptimal random search pattern. Thanks Rubidium.
|
|
Darkvater
|
r4849:41dc3967353a
|
18 years ago
|
|
(svn r6775) -Codechange: Use some more proper types, especially Owner and PlayerID as these are used intermixed often.
|
|
Darkvater
|
r4848:23347d73ba8f
|
18 years ago
|
|
(svn r6774) -Codechange: Rename the badly named OWNER_SPECTATOR to PLAYER_SPECTATOR and put it into player.h where it belongs (instead of map.h)
|
|
Darkvater
|
r4846:354bffcccf75
|
18 years ago
|
|
(svn r6772) -Codechange: Do not abuse OWNER_SPECTATOR as the "owner" of the industry for the minimap. This also saves us from having this huge _owner_colors table.
|
|
glx
|
r4561:c9056fdf2d37
|
18 years ago
|
|
(svn r6408) -Fix(r6406): compilation was broken -Codechange: Rename TileIndexDiffCByDir to TileIndexDiffCByDiagDir because it accepts DiagDirections
|
|
Darkvater
|
r4559:2222e3ea9700
|
18 years ago
|
|
(svn r6406) -Codechange: Rename TileOffsByDir to TileOffsByDiagDir because it accepts DiagDirections, and add TileOffsByDir that handles Directions. -Codechange: Make the treeloop use TileOffsByDir().
|
|
rubidium
|
r4344:bff007ae1fd1
|
18 years ago
|
|
|
|
tron
|
r4000:702cb45b8eab
|
18 years ago
|
|
|
|
tron
|
r2794:cf7bea53ebee
|
19 years ago
|
|
|
|
tron
|
r2548:9570bbbdacab
|
19 years ago
|
|
(svn r3077) static, const, bracing, indentation, 0 -> '\0'/NULL, typos in comments, excess empty lines, minor other changes nothing spectacular, just some stuff, which piled up
|
|
Darkvater
|
r2436:963efe8b84cc
|
19 years ago
|
|
(svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters - change a lot of byte player types to PlayerID - beautify header files, same "#endif /* filename */" ending
|
|
matthijs
|
r2403:6989f240f99b
|
19 years ago
|
|
(svn r2929) * Move DistanceTrack from map.c to npf.c and rename to 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.
|
|
tron
|
r2360:8cc52b4a45df
|
19 years ago
|
|
|
|
tron
|
r2186:5ee653b1b5e1
|
19 years ago
|
|
|
|
tron
|
r2159:2c706fe6b0a7
|
19 years ago
|
|
|
|
ludde
|
r2051:04d7c352ccc4
|
19 years ago
|
|
(svn r2560) Fix: various minor code changes. 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.
|
|
tron
|
r2049:7e26d55f0f4c
|
19 years ago
|
|
|
|
tron
|
r1981:addba4bccc89
|
19 years ago
|
|
|
|
tron
|
r1980:3622a0cd06c2
|
19 years ago
|
|
|
|
tron
|
r1977:1f8b99c96041
|
19 years ago
|
|
|
|
matthijs
|
r1942:ea8e39498c72
|
19 years ago
|
|
(svn r2448) General cleanup of rail related code, more to follow. * Add: rail.[ch] for rail-related enums and wrapper functions. * Codechange: Removed dozens of magic numbers with below enums. * Codechange: Rewrote CheckTrackCombination(). * Add: TILE_SIZE, TILE_PIXELS and TILE_HEIGHT constants. * Add: enums RailTileType, RailTileSubtype, SignalType to mask against the map arrays. * Add: enums Track, TrackBits, Trackdir, TrackdirBits for railway track data. (Note that the old RAIL_BIT constants are replaced by TRACK_BIT ones). * Add: enums Direction and DiagDirection * Codechange: Moved a bunch of track(dir) related lookup arrays from npf.[ch] to rail.[ch]. * Codechange: move RailType enum from tile.h to rail.h. * Add: Wrapper functions for masking signal status in the map arrays: SignalAlongTrackdir, SignalAgainstTrackdir and SignalOnTrack. * Add: Wrapper functions to access rail tiles, using above enums * Add: Wrapper functions to modify tracks, trackdirs, directions, etc. * Add: Wrapper functions for all lookup arrays in rail.[ch] (Arrays are still used in parts of the code) * Codechange: Renamed some variables and arguments to better represent what they contain (railbit -> track, bits -> trackdirbits, etc.). * Codechange: Don't use FindLandscapeHeight() in CmdRemoveSingleRail(), since it returns way too much info. Use GetTileSlope() instead. * Codechange: [NPF] Removed some unused globals and code from npf.c.
|
|
matthijs
|
r1679:85964efc57dc
|
20 years ago
|
|
|
|
matthijs
|
r1677:37d9fb173278
|
20 years ago
|
|
(svn r2181) - Add: DistanceTrack() to calculate the distance over optimally 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.
|
|
tron
|
r1433:20d578a3fb02
|
20 years ago
|
|
|
|
tron
|
r1394:275bd5541bae
|
20 years ago
|
|
|
|
matthijs
|
r1330:62eaa061ec97
|
20 years ago
|
|
(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.
|
|
matthijs
|
r1247:d01094dbcdcc
|
20 years ago
|
|
(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().
|
|
tron
|
r1245:eb9b943bd917
|
20 years ago
|
|
|
|
tron
|
r1218:b56319aa5250
|
20 years ago
|
|
|
|
tron
|
r1210:c146ba199eb2
|
20 years ago
|
|
|
|
tron
|
r1209:5955f8748394
|
20 years ago
|
|
|
|
tron
|
r1202:95cf4c0fd209
|
20 years ago
|
|
(svn r1706) Implement ScaleByMapSize() and ScaleByMapSize1D() 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.
|
|
tron
|
r1174:4ffa62f5467c
|
20 years ago
|
|
(svn r1676) Increase the size of TileIndex and TileIndexDiff to 32bits and adapt the save/load data and some other parts of the code to that change
WARNING: If i made any mistake here it WILL lead to corrupted savegames!
|
|
tron
|
r1059:bbcabb62c19c
|
20 years ago
|
|
(svn r1560) Introduce SetTileType() and SetTileHeight() Replace direct references to _map_type_and_height with these
|
|
tron
|
r1044:d63b879a32db
|
20 years ago
|
|
(svn r1545) Add TileHeight() which returns the height (not multiplied by 8) Replace some direct references to _map_type_and_height with TileHeight()/IsTileType()
|
|
tron
|
r1041:861c81f15ca0
|
20 years ago
|
|
|
|
tron
|
r1035:d35ec5ea5f73
|
20 years ago
|
|
|
|
tron
|
r979:ce13d8138fa3
|
20 years ago
|
|
|
|
tron
|
r955:63797b6ea518
|
20 years ago
|
|
|
|
tron
|
r927:dedf35f80507
|
20 years ago
|
|
(svn r1415) Move TILE_FROM_XY and TILE_XY to map.h and push TILE_[XY] bits from map.h into map.c. Now the whole source except map.c is independent of TILE_[XY]_BITS!
|
|
tron
|
r926:fcf36609eb94
|
20 years ago
|
|
|
|
tron
|
r909:898755bd4512
|
20 years ago
|
|
|
|
tron
|
r900:6c526ed4f41b
|
20 years ago
|
|
(svn r1386) Move TileIndexDiff to map.h Move _tileoffs_by_dir to map.[ch] and encapsulate it in TileOffsByDir()
|
|
tron
|
r863:a3262138da98
|
20 years ago
|
|
|
|
tron
|
r856:e23ff9905ff0
|
20 years ago
|
|
(svn r1337) Use MapMax[XY]() (or MapSize[XY]() if appropriate) instead of TILE_MAX_[XY] While here replace one erroneous TILE_MAX_X with MapMaxY()
|
|
truelight
|
r817:5620a6b29ae5
|
20 years ago
|
|
(svn r1288) -Codechange: changed _map2 to an uint16. It is still saved and 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!!
|
|
tron
|
r695:3e7d09303a5c
|
20 years ago
|
|
|
|
tron
|
r689:c33ae44e7bfc
|
20 years ago
|
|
|
|
tron
|
r679:3a7b08cc8504
|
20 years ago
|
|
|