Commit Graph

31 Commits

Author SHA1 Message Date
truelight b23f719ab9 (svn r6053) -Codechange: renamed all IsXXXIndex to IsValidXXXID
-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
2006-08-22 18:15:17 +00:00
truelight 0461d89612 (svn r6047) -Codechange: FOR_ALL now _only_ loops valid items, and skips 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.
2006-08-22 15:33:35 +00:00
rubidium 480af9c917 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct. 2006-08-22 14:38:37 +00:00
tron 4ad8d1c7a2 (svn r5907) Remove more indirection by using pointers instead of IDs. Also fix some bogus warnings on MSVC by using (void*) casts 2006-08-15 07:07:17 +00:00
celestar 1d606e7392 (svn r4591) -Fix (FS#122) Game no longer errors out when "Many random towns" 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
2006-04-27 11:19:12 +00:00
belugas f4bbce2c39 (svn r4261) CodeChange : Add and Use Accessor for Houses Construction. And cleaning on town.flags12 too 2006-04-03 14:56:07 +00:00
Darkvater 17bdb11feb (svn r4133) - Some miscellaneous changes (unconverted TownID in function definition, Owner instead of byte, remove obsolete member and compare waypoint index with 0 not STR_NULL) 2006-03-26 22:58:11 +00:00
Darkvater 2ba792d644 (svn r4130) - CodeChange: Add proper semantics for TownID for such variables instead of using the general uint16-type. We probably need to change GetTown() and IsTownIndex() as well to use TownID. 2006-03-26 22:41:56 +00:00
tron b844aa2db3 (svn r3520) Remove unused parameters from some functions 2006-02-02 07:15:46 +00:00
tron e272b03fee (svn r3365) Staticise 36 functions 2006-01-05 12:40:50 +00:00
tron 3397e202c8 (svn r3024) -Codechange: Another batch of replacements of int/uint/int16/byte/-1 with proper types and constants 2005-10-07 07:35:15 +00:00
Darkvater 8e6a911700 (svn r2962) - const correctness for all Get* functions and most Draw* 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-09-18 20:56:44 +00:00
tron a227065ab7 (svn r2701) Insert Id tags into all source files 2005-07-24 14:12:37 +00:00
tron 3154e7148d (svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile" 2005-06-24 12:38:35 +00:00
Darkvater ab954a934a (svn r2288) - CodeChange: protected the next batch of commands (41 so far, 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)
2005-05-09 22:33:00 +00:00
celestar fe6f9e9a65 (svn r1881) -Fix: [ 1119308 ] Max passengers / mail variables are now 32 bit 2005-02-17 10:56:19 +00:00
celestar 77d26759e3 (svn r1866) -Fix: Intercepted generated maps with 0 towns on it. Currently just an
error() is called, some more graceful handling should be implemented
later.
2005-02-13 09:42:49 +00:00
matthijs c5c5c9b17c (svn r1834) - Fix: NPF does not check the owner of its target, busses try to 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 22:36:08 +00:00
truelight 777dd99585 (svn r1764) -Add: dynamic towns, you can now have up to 64k towns (let me know when
you have that amount of towns in a map ;))
2005-02-01 18:32:01 +00:00
tron b18851e0b9 (svn r1724) Set maximum number of industries and towns to 250 each 2005-01-29 20:18:01 +00:00
tron 189ca73707 (svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile 2005-01-22 20:23:18 +00:00
celestar 962dd27a8c (svn r1581) Added a display for the total map population to the town display (Jango) 2005-01-21 16:51:25 +00:00
tron 3279a7c9a2 (svn r1520) Trim 134 (!) lines with trailing whitespace ): 2005-01-15 08:58:31 +00:00
celestar febac23b25 (svn r1504) enummed town ratings (Jango) 2005-01-14 09:20:12 +00:00
truelight 63e97754fb (svn r1407) -Codechange: changed a lot around _stations, _vehicles, _towns 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 *.
2005-01-06 22:31:58 +00:00
truelight 92ac503b74 (svn r1312) -Add: Patch which is on by default: population in label of the town
-Fix: Expand town is a bit more agressive
-Fix: Fixed a bug in growing algorithm
2004-12-31 18:57:24 +00:00
truelight e6a59be8c0 (svn r1291) -Codechange: prepared subsidies and towns to become an uint16 (happens
after savegame bump)
2004-12-28 17:40:15 +00:00
truelight eb49a19460 (svn r194) -Codechange: stripping trailing-spaces. Please keep this that way! 2004-09-10 19:02:27 +00:00
dominik 770f86bbbe (svn r122) Change: exclusive transport rights are now stored per town instead of per station
Exclusive rights from old savegames will be reset.
2004-08-23 21:04:39 +00:00
darkvater a32d8553e7 (svn r5) -Fix: townname generation of TTDLX savegames. All work
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)
2004-08-10 14:42:52 +00:00
truelight efaeb275f7 (svn r1) Import of revision 975 of old (crashed) SVN 2004-08-09 17:04:08 +00:00