Age | Commit message (Collapse) | Author |
|
|
|
-Codechange: DestroyTown is called by DeleteTown to remove all things where a town depends on.
Last 2 changes to prepare for new pool system. Not pretty now, will be soon.
|
|
Note: _total_towns and _total_industries willb e removed soon, so this 'hack' is okay, for now ;)
|
|
a valid XXX, unless there are none to pick from. Then NULL is returned.
|
|
(or, will do that).
It isn't the best name, but we couldn't find any better.
This unifies the pool-system even more.
|
|
-Codechange: IsValidXXXID now also checks if XXX is really valid, not if the number is within range
Both changes again in preperation of the new mem-pool system, which requires this.
IsValidXXXID is not a bit less pretty, but that will be cleaned up after the new mem-pool system
|
|
invalid ones
-Codechange: use IsValidXXX where ever possible
Note: both changes to prepare for new pool system, which needs those changes.
For every pool there are 2 ugly lines, which will be removed when done
implementing new pool system.
Based on FS#13 by blathijs, partly implemented.
|
|
whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
|
|
fix some bogus warnings on MSVC by using (void*) casts
|
|
is selected in the scenario editor.
-Side effects:
- Removed one global variable from variables.h
- Remove an ugly hack for the "many random towns" function
|
|
cleaning on town.flags12 too
|
|
definition, Owner instead of byte, remove obsolete member and compare waypoint index with 0 not STR_NULL)
|
|
instead of using the general uint16-type. We probably need to change GetTown() and IsTownIndex() as well to use TownID.
|
|
|
|
|
|
int/uint/int16/byte/-1 with proper types and constants
|
|
functions that don't change their pointer parameters
- change a lot of byte player types to PlayerID
- beautify header files, same "#endif /* filename */" ending
|
|
|
|
|
|
out of 115).
- CodeChange: changed the airport gui airport-type checking. Added function GetValidAirports() that returns bitmasked availibility, is also used for checking.
- CodeChange: to check tree-planting, 2 const arrays have been moved to table/tree_land.h (type and count)
- CodeChange: added IsTownIndex() in following of IsStationIndex(), etc.
- Fix (regression): road tunnels did not work anymore, forgot that their type was 0x200 (documented now)
|
|
|
|
just an
error() is called, some more graceful handling should be implemented
later.
|
|
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.
|
|
know when
you have that amount of towns in a map ;))
|
|
|
|
appropriate warning flags in the Makefile
|
|
(Jango)
|
|
|
|
|
|
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 *.
|
|
-Fix: Expand town is a bit more agressive
-Fix: Fixed a bug in growing algorithm
|
|
(happens
after savegame bump)
|
|
|
|
instead of per station
Exclusive rights from old savegames will be reset.
|
|
except for German Townnames (also fix one typo on
English town-names)
-CodeChange: *act_paper to *act_water in Town to
more resemble its use
-Fix: AI players now retain AI status. Since TTDLX
savegame status is not fully documented, some holes
exist (AI state is set to one without a vehicle, otherwise
it crashes)
|
|
|