Age | Commit message (Collapse) | Author |
|
protect bridge building against invalid bridges and some safeguards when drawing.
|
|
explicit types as parameters
|
|
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.
|
|
-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)
|
|
give the more meaningful names
|
|
owns (hacked client protection)
|
|
this commit alters ai.c a little to get rid of the workaround from r1725 so AI players could still build locomotives
|
|
to 8) on
a single station.
Thanks to: Truelight for the saveload code, Darkvater and Hackykid for
network testing and Tron for proof-reading 1500 lines of diff.
|
|
incremented/decremented every time until suitable ground is found is compared to the direction it is going in. If this wraps, return error. For this treat the tile itself as a TileIndexDiff
|
|
single tile from map.h and put them into a seperate file tile.h
|
|
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!
|
|
|
|
appropriate warning flags in the Makefile
|
|
saveroutine to
crash from time to time
-Codechange: added const before 'Order *' where possible
|
|
them into inline functions and add some asserts
|
|
-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!
|
|
|
|
the latter into inline functions names Tile[XY]
|
|
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 *.
|
|
|
|
Move _tileoffs_by_dir to map.[ch] and encapsulate it in TileOffsByDir()
|
|
|
|
map.c and map.h
|
|
|
|
|
|
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.
|
|
|
|
to check limits
|
|
- "inline" must before the return type (and after "static")
- Initialise all struct members, not just some of them
- Remove (one) spurious semicolon
|
|
depots (pasky).
|
|
Thanks to lvoge
|
|
|
|
|
|
-Fix: some minor fixes around GetTileTrackStatus (blathijs)
|
|
-Add: AI overrides service interval to 180 days
-Fix: AI hanged when all vehicles were disabled in Patch menu
|
|
Fix: I forgot to delete a local var from ai.c
|
|
|
|
|