summaryrefslogtreecommitdiff
path: root/depot.h
AgeCommit message (Collapse)Author
2006-05-27(svn r4987) Feature: Merged YAPF into trunk. Thanks to devs for continuous ↵KUDr
support and users for testing.
2006-05-21(svn r4940) Remove the dubious feature of remembering the last built depot. ↵tron
It serves no real purpose except causing confusion
2006-04-23(svn r4541) Add a type for slopes and replace many magic numbers by the ↵tron
appropriate enums
2006-03-26(svn r4131) - CodeChange: Add proper semantics for StationID for such ↵Darkvater
variables instead of using the general uint16-type. StationID was added for depots, waypoints and stations where necessary. We probably need to change GetDepot(), IsDepotIndex(), IsStationIndex(), GetWaypoint() and IsWaypointIndex() as well to use StationID.
2006-03-26(svn r4130) - CodeChange: Add proper semantics for TownID for such variables ↵Darkvater
instead of using the general uint16-type. We probably need to change GetTown() and IsTownIndex() as well to use TownID.
2006-03-12(svn r3831) Add and use GetRailDepotDirection()tron
2006-03-11(svn r3816) Use existing accessorstron
2006-03-05(svn r3767) Move all direction related enums and functions to a separate headertron
2006-02-01(svn r3511) More whitespace ([FS#46] by Rubidium)tron
2005-10-05(svn r3019) -Codechange: Replace explicit shifting/anding/oring with GB and SBtron
2005-07-24(svn r2701) Insert Id tags into all source filestron
2005-07-21(svn r2663) Include variables.h only in these files which need it, not ↵tron
globally via openttd.h
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-24(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"tron
2005-06-20(svn r2465) Remove some unreachable codetron
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-05-11(svn r2294) - CodeChange: check the service interval settings when changing ↵Darkvater
of all vehicle-types. To simplify things introduce GetServiceIntervalClamped() that returns the same or clamped value of the new service interval. There were some inconsistencies in the gui files so I had to change those, and const correctness kicked in, so it's a bit messy at certain points.
2005-04-22(svn r2222) Check the parameters of Cmd{Insert,Delete,Modify,Skip}Order() ↵tron
and CmdRestoreOrderIndex(): - Check if the vehicle exists - Check if the vehicle belongs to the correct player - Check if the new order is valid (type, destination, flags) (CmdInsertOrder)
2005-04-05(svn r2154) - Fix: [NPF] Vehicles should no longer try to drive through the ↵matthijs
back of depots and road stations. - Add: GetDepotDirection() wrapper function. - Fix: [NPF] Ships can now actually reach buoys.
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)