Age | Commit message (Collapse) | Author |
|
-Codechange: DestroyIndustry is called by DeleteIndustry to remove all things where a industry 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.
|
|
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.
|
|
-Cleanup: use TownID and StationID for two instances of uint16
|
|
(over time) (based on peter1138's patch, FS#82)
To make this to work, in older games farmland is removed on load, and replanted
|
|
based at the year 0.
The game date subsystem now allows someone to start in the year 0 and continue
up to the year 5 000 000. However, you currently cannot build anything before
1920 as there is no newgrf support for dates before 1920 or after 2090 yet.
|
|
fix some bogus warnings on MSVC by using (void*) casts
|
|
Removing the _industry_type_costs in favor of IndustrySpec.cost_multiplier;
In order to let industry_gui use the GetIndustrySpec accessor,
some structs had to be moved in industry.h
|
|
use IndustryGfx type instead of uint
|
|
step toward bringing accessors [G|S]etIndustrype
|
|
savegames by an enum is a very bad idea
|
|
definition, Owner instead of byte, remove obsolete member and compare waypoint index with 0 not STR_NULL)
|
|
variables instead of using the general byte-type.
|
|
|
|
functions that don't change their pointer parameters
- change a lot of byte player types to PlayerID
- beautify header files, same "#endif /* filename */" ending
|
|
|
|
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.
|
|
1kx1k maps should now be much faster, and give more than just oil-stuff ;)
|
|
|
|
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 *.
|
|
|
|
|