summaryrefslogtreecommitdiff
path: root/tile.h
AgeCommit message (Collapse)Author
2006-03-12(svn r3830) Move IsTunnelTile() from tile.h to tunnel_map.h and add ↵tron
IsTunnel(), which just checks for a tunnel, but not the tile type as IsTunnelTile() does
2006-03-05(svn r3767) Move all direction related enums and functions to a separate headertron
2006-03-05(svn r3766) Add a function to get the RoadBits from an arbitrary tiletron
2006-02-28(svn r3689) Add functions to turn a tile into either a normal road tile, a ↵tron
level crossing or a road depot
2006-01-28(svn r3455) * Assert against modifying the outer border of a map into ↵matthijs
anything but MP_VOID. This might detect a bug that has been there for quite some time, if it hasn't been fixed already.
2005-10-05(svn r3019) -Codechange: Replace explicit shifting/anding/oring with GB and SBtron
2005-09-18(svn r2962) - const correctness for all Get* functions and most Draw* ↵Darkvater
functions that don't change their pointer parameters - change a lot of byte player types to PlayerID - beautify header files, same "#endif /* filename */" ending
2005-08-23(svn r2886) Rename the "owner" attribute to "m1", because when it stores an ↵tron
owner it is accessed by [GS]etOwner anyway and when it doesn't store an owner, but arbitrary data, accessing a field called "owner" is confusing.
2005-07-24(svn r2701) Insert Id tags into all source filestron
2005-07-19(svn r2635) Fix: [ntp/misc] Improve the old pathfinder. Changed it to A* ↵ludde
instead of Dijkstra. - Benchmark shows that NTP is now around 10x faster than NPF. - Made IsTunnelTile macro to determine if a tile is a tunnel. - Added some useful debugging functions for making tiles red / getting accurate timestamps. - Remove old depot finding algorithm. - Disable warning for signed/unsigned comparisons.
2005-07-16(svn r2595) -Codechange: Introduced "IsSteepTileh" to find whether a tile is ↵celestar
steep (i.e. spans two height levels) and use it throughout the code. -Codechange: Add CanBuildDepotByTileh to find if a tile is suitable to build a depot on it. Wraps some bitmagic which seems quite unreadable at first glance
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-22(svn r2473) - Add: VehicleMayEnterTile(), which checks if the tile owner of ↵matthijs
a tile is correct for a vehicle to enter it. Based upon glx's code. - Fix: [ 1203769 ] [NPF] NPF tries to plan over bridges, through tunnels, over level crossings of other players. (glx) - Codechange: Renamed TRANSPORT_MAX to TRANSPORT_END and added INVALID_TRANSPORT. - Codechange: Moved IsLevelCrossing() from tile.h to rail.h - Add: GetCrossingTransportType(), which returns the transport type (road, rail) of both tracks on a level crossing. - Removed old TODO that was fulfilled already.
2005-06-17(svn r2450) * Codechange: Replaced all uses of the arrays in tile.h with ↵matthijs
calls to the associated wrapper functions. * Codechange: Made npf.c use some map array accessing wrappers instead of direct access. * Codechange/Fix: Named every enum in tile.h. Fixes a nasty bug on MSVC where arrays would be initialised with zeroes (tnx Asterix_) * Removed magic numbers from tables in tile.c. * Added some explicit casts in tile.h.
2005-06-16(svn r2448) General cleanup of rail related code, more to follow.matthijs
* 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.
2005-06-07(svn r2433) - CodeChange: unmagicify all road/train crossings with ↵Darkvater
IsLevelCrossing() function (peter1138)
2005-06-04(svn r2408) Introduce SetTileOwner() and use ittron
2005-06-03(svn r2404) assert that GetTileOwner() isn't called for tiles, which don't ↵tron
store owner information
2005-05-22(svn r2358) Add macros for getting (GB) and setting (SB) a range of bitstron
Use them exemplarily to prettify (Get|Set)Tile(Type|Height)
2005-05-02(svn r2253) - Fix: [ 1190896 1184378 ] [NPF] Trains ignoring their railtype ↵matthijs
(mono, maglev) (glx)
2005-02-22(svn r1898) Remove some unused macros from macros.h and move some others to ↵tron
more appropriate headers
2005-02-07(svn r1839) Move GetTileSlope() and GetTileZ() into tile.[ch] and use more ↵tron
explicit types as parameters
2005-02-07(svn r1837) GetTileOwner returns Owner, not booltron
Also assert() that the TileIndex is valid
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-01-29(svn r1718) Use the enum TileType as parameter/return type for ↵tron
[GS]etTileType() instead of plain int. This makes it necessary to rename TileType() to GetTileType() because a type and a function may not share the same name.
2005-01-29(svn r1715) Move [GS]etMapExtraBits to tile.[ch]tron
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