summaryrefslogtreecommitdiff
path: root/town_cmd.c
AgeCommit message (Collapse)Author
2005-04-03(svn r2142) - Fix: Game no longer crashes when you want to remove a piece of ↵Darkvater
road under a bridge that belongs to the town. TODO: railcrossings store owner somewhere else, put it into _map_owner[]!
2005-03-20(svn r2033) - Fix: Fix some more desync by saving the town growth frequency ↵pasky
iterator _cur_town_iter. Needed to bump a svg revision for that thanks to the braindead SlGlob thing, or at least I don't know how to do it without bumping it.
2005-03-17(svn r2021) Fix: Enlarge _cur_town_ctr from byte to uint32 so that all the ↵pasky
towns are considered when growing them even for big maps, where much more than 256 towns are around; reported by Tomasz Dubiński <uboottd@hydra.polsl.gliwice.pl>. The savegame still saves just the lowest 8 bits but that doesn't hurt so much.
2005-03-12(svn r2004) - Fix: [ 1149487 ] Autosave ignoring settingsDarkvater
- Fix: [ 1153926 ] All my settings in vain... IGNORED! - Change: I hope I got it all right. Pressing 'New Game' (either choosing random or a preset scenario) and 'Create Scenario' will start a new game with the settings and difficulty in the intro menu. Using 'Load Game' and 'Play Scenario' will take the values from the savegame/scenario itself.
2005-03-07(svn r1955) Fix: Make the town growth frequency scale properly both up and ↵pasky
down. The scaling is now also based on the number of towns instead of the map size. (In cooperation with HackyKid.)
2005-03-06(svn r1952) Fix: Hopefully fixed the enormous towns growth slowdown in large ↵pasky
maps. (Inspired by toholio.)
2005-03-05(svn r1925) Fixed an infinite loop if the town generator runs out of town ↵pasky
names. The number of generated towns is then limited by the number of available names.
2005-02-17(svn r1881) -Fix: [ 1119308 ] Max passengers / mail variables are now 32 bitcelestar
2005-02-13(svn r1866) -Fix: Intercepted generated maps with 0 towns on it. Currently ↵celestar
just an error() is called, some more graceful handling should be implemented later.
2005-02-07(svn r1839) Move GetTileSlope() and GetTileZ() into tile.[ch] and use more ↵tron
explicit types as parameters
2005-02-06(svn r1832) Next byte -> char iteration: custom namestron
2005-02-06(svn r1831) -Fix: Scenario Editor now handles human-made roads better (try ↵truelight
to build a city layout before placing the city, finally that works very nice)
2005-02-06(svn r1813) Declare functions implemented in strings.c in their own shiny ↵tron
new header (though i think some of these function don't belong into strings.c)
2005-02-05(svn r1808) Use strcmp() instead of home brewed function str_eq()tron
2005-02-04(svn r1784) -Fix: removed ClosestTownFromTile where possible, or replaced it truelight
with _map2-data if possible (Celestar / TrueLight)
2005-02-02(svn r1768) -Codechange: Store town index in _map2 of town tilescelestar
Moved house type from _map2 to _map3_hi for MP_HOUSE Moved foundation and roadworks from _map2 to _map3 for MP_STREET This increases game speed by a factor of around 15(!) if many cities are around. Converting an old game is done automagically, but can take a while
2005-02-01(svn r1765) -Fix: on loading, the total amount of towns wasn't reset to zerotruelight
2005-02-01(svn r1764) -Add: dynamic towns, you can now have up to 64k towns (let me ↵truelight
know when you have that amount of towns in a map ;))
2005-01-31(svn r1756) Cleanup: if cascade -> switch, uint -> TileIndextron
2005-01-31(svn r1749) Move the functions which calculate distances to map.[ch] and ↵tron
give the more meaningful names
2005-01-29(svn r1713) Split off several functions which query/set information about a ↵tron
single tile from map.h and put them into a seperate file tile.h
2005-01-28(svn r1706) Implement ScaleByMapSize() and ScaleByMapSize1D()tron
These scale a number relative to the map size/circumference. Use them to scale the amount of map objects. Of course at the moment they return just the input, because there are no bigger/smaller maps yet.
2005-01-25(svn r1676) Increase the size of TileIndex and TileIndexDiff to 32bits and ↵tron
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!
2005-01-22(svn r1594) Convert all undefined parameter lists to (void) and add the ↵tron
appropriate warning flags in the Makefile
2005-01-21(svn r1581) Added a display for the total map population to the town display ↵celestar
(Jango)
2005-01-16(svn r1542) Rename TileHeight to TilePixelHeight, because this is what it ↵tron
actually returns
2005-01-16(svn r1536) Move GET_TILEHEIGHT, GET_TILETYPE and IS_TILETYPE to map.h, turn ↵tron
them into inline functions and add some asserts
2005-01-14(svn r1504) enummed town ratings (Jango)celestar
2005-01-07(svn r1414) Move TileIndex, TILE_MASK and GET_TILE_[XY] to map.h and turn ↵tron
the latter into inline functions names Tile[XY]
2005-01-06(svn r1407) -Codechange: changed a lot around _stations, _vehicles, _towns ↵truelight
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(svn r1396) Introduce TileIndexDiffC - the compile time version of TileIndexDifftron
2005-01-05(svn r1386) Move TileIndexDiff to map.htron
Move _tileoffs_by_dir to map.[ch] and encapsulate it in TileOffsByDir()
2005-01-03(svn r1344) Use MapSize[XY]() (or MapSize()/MapMax[XY]() where appropriate) ↵tron
instead of TILES_[XY]
2004-12-31(svn r1313) -Fix: fixed MSVC problemtruelight
2004-12-31(svn r1312) -Add: Patch which is on by default: population in label of the towntruelight
-Fix: Expand town is a bit more agressive -Fix: Fixed a bug in growing algorithm
2004-12-30(svn r1301) -Codechange: _industries finally has FOR_ALL_INDUSTRIES tootruelight
2004-12-28(svn r1288) -Codechange: changed _map2 to an uint16. It is still saved and ↵truelight
loaded as an uint8 till the savegame version is bumped to version 5. Then it works automaticly as a fully uint16. So _stations[] can not be increased till after the bump!!
2004-12-15(svn r1117) Move map arrays and some related macros into their own files ↵tron
map.c and map.h
2004-12-04(svn r942) -Merged branch/network back into the trunktruelight
2004-12-02(svn r901) Small step in the process to clean up the DPARAM mess:tron
- reduce to 2 sizes (*DParam64 for 64bit values, *DParam for the rest) - use inline functions instead of macros - add assert()s to check for buffer overruns
2004-11-26(svn r831) Remove station-specific roadbits magic. Tron already fixed road ↵pasky
stations so that they don't give out roadbits in r780.
2004-11-26(svn r830) Move the MP_STATION roadbits guard to GetTownRoadBitsByTile() ↵pasky
wrapper of GetRoadBitsByTile(). This should really and for once fix the road-behind-road-station bug.
2004-11-25(svn r815) Include strings.h only in the files which need it.tron
This should reduce the compile time after altering english.txt by about 1/3, because "only" 62 instead of 90 .c files must be recompiled.
2004-11-23(svn r787) Invert the sense of the DO_TRANS_BUILDINGS flag to be consistent ↵tron
with its own name and all other DO_* flags. Now it is active-true.
2004-11-22(svn r764) Enumerate the houses only one per town can exist and use the ↵tron
enums instead of magic numbers to check for these
2004-11-22(svn r760) Replace some bit-juggling with bit fieldstron
2004-11-22(svn r756) Demystify and explain some piece of code regarding which house ↵tron
sprite to draw
2004-11-21(svn r724) Remove restriction that a tile can only accept 3 cargo types.tron
This especially enables houses to accept passengers, mail, goods AND food. Add string templates for up to 5 cargo types for the tile info window. If more are needed just add them. Simplify (de-uglify) the logic for cargo acceptence for houses and split the goods/food table into two. The acceptance is unmodified, but accepting goods AND food is now trivially possible. The exact amounts have to be decided. This is based on Celestar's changes in the map branch plus some further bits that will be merged there soon.
2004-11-20(svn r703) Attempt to improve the town growth algorithm - now it scales over ↵pasky
76 houses, is slightly exponential and travels further for larger towns.
2004-11-20(svn r698) Merge a town growth fix from TTDPatch - in arctic and desert ↵pasky
climate, require food (and possibly water) only if the population is more than 90, so that the town gets chance to actually accept it. (By Marcin?)