rubidium
c140ca6f20
(svn r7563) -Fix (FS#468): removing towns in the scenario editor could leave subsidies with that town as source/destination, resulting in an assertion when displaying the Subsidies Window.
2006-12-26 15:28:11 +00:00
rubidium
8d2c82bc2a
(svn r7477) -Fix (7451): Allocate(Industry|Town) get called twice when trying to build an industry/town via a command, thus incrementing the number of towns/industries twice when created via a command.
2006-12-11 12:37:57 +00:00
rubidium
5b5b1d1514
(svn r7451) -Fix (7372): GetNum(Towns|Industries) should return the actual number of towns and industries.
...
-Fix (6055): GetMax(Town|Industry)Index should not return the number of towns or industries - 1, but the size of the pool - 1.
2006-12-09 14:14:51 +00:00
matthijs
9218fc16e6
(svn r7372) - CodeChange: Rename all GetXXXArraySize() functions to GetNumXXX() and add GetMaxXXXIndex() functions. This prepares for the new pool interface.
2006-12-05 13:58:20 +00:00
matthijs
231111ce3d
(svn r7331) - Codechange: Rename all memory pool macro's and types to "old pool", so the new pool implementation can be committed alongside it.
...
- Codechange: Rename pool.[ch] to oldpool.[ch].
2006-12-03 17:27:43 +00:00
belugas
c26dc76a7d
(svn r7198) -Codechange: Implement a circular tile search function.
...
Just provide the number of tiles per side, a pointer to a test function, the tile to start searching and voila.
Fixes [FS#364] by removing a lengthy and suboptimal random search pattern.
Thanks Rubidium.
2006-11-17 23:01:58 +00:00
rubidium
4a986e43d4
(svn r7152) -Feature (FS#396): allow towns to be built on top of trees in the scenario editor.
2006-11-15 18:57:00 +00:00
belugas
ebd054b8d8
(svn r7121) -Fix(r1): Tell the town that this player has built a statue only if it really did happened
2006-11-09 18:31:06 +00:00
Darkvater
fd2b3d3e14
(svn r7120) -Fix (r6631): A town size of 0 in the scenario editor is a random size. So to get a size
...
you need it between 1 and 3 and therefore there is no one-on-one correspondence between
widget-numbers and town-size. Based on a patch by Maedhros
2006-11-09 13:03:34 +00:00
tron
e397b721cd
(svn r6986) Use the pool macros for the Town pool
2006-10-28 11:55:29 +00:00
Darkvater
ee27bb497c
(svn r6884) -Codechange: Add strict bounds checking in string formatting system.
...
The last parameter should point to the end of the buffer (eg lastof(buf))
Courtesy of Tron.
2006-10-21 23:31:34 +00:00
Darkvater
6b6d908308
(svn r6776) -Codechange: Use IsValidPlayer() function to determine of a PlayerID is an
...
actual playable player (< MAX_PLAYERS) or not.
2006-10-14 22:31:18 +00:00
Darkvater
3ccc87b376
(svn r6462) -Codechange: Have GetStringWidth() return width as well as the height bounding
...
box of the string. Therefore rename the function to GetStringBoundingRect()
and have it return a BoundingRect type of width/height
2006-09-16 13:20:14 +00:00
Darkvater
80814dbb1d
(svn r6406) -Codechange: Rename TileOffsByDir to TileOffsByDiagDir because it accepts
...
DiagDirections, and add TileOffsByDir that handles Directions.
-Codechange: Make the treeloop use TileOffsByDir().
2006-09-05 23:21:41 +00:00
rubidium
63687763e9
(svn r6381) -Cleanup: make the '/* */' comments that span multiple lines more uniform.
...
-Cleanup: whitespace alignment of a few tables.
2006-09-04 20:40:33 +00:00
rubidium
27cee58ab8
(svn r6204) -Cleanup: replace non-indentation with spaces; like '}<TAB>else {' -> '} else {', tabs between code and comment, etc.
2006-08-28 18:53:03 +00:00
truelight
bb9f29ae1f
(svn r6149) -Codechange: DeleteTown removes a town from the pool
...
-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.
2006-08-26 18:05:05 +00:00
truelight
602c0d40b3
(svn r6137) -Codechange: some very minor cleanups:
...
- Start using DeleteXXX for every pool item, not manually doing it
- Use some wrapper to improve logic
- Rewrote some pieces to improve logic
2006-08-26 14:22:54 +00:00
truelight
93d5b5a355
(svn r6058) -Fix: Get(Industry|Town)ArraySize could never return 0
...
Note: _total_towns and _total_industries willb e removed soon, so this 'hack' is okay, for now ;)
2006-08-22 21:17:19 +00:00
truelight
3cdabcbbac
(svn r6056) -Codechange: don't use a loop what can be done with a simple wrapper
2006-08-22 20:56:08 +00:00
truelight
5fd9aeb12b
(svn r6055) -Codechange: added GetXXXArraySize, which returns HighestID + 1 (or, will do that).
...
It isn't the best name, but we couldn't find any better.
This unifies the pool-system even more.
2006-08-22 20:41:26 +00:00
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
rubidium
b1e2ae44d6
(svn r6005) -Cleanup: introduce IndustryID and use it
...
-Cleanup: use TownID and StationID for two instances of uint16
2006-08-20 19:31:58 +00:00
truelight
81b96bf881
(svn r5970) -Fix [FS#49]: town-growth removed houses under construction to make way for road. Not wanted behavoir (Rubidium)
2006-08-20 11:41:34 +00:00
truelight
10b842bddc
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
...
- New optional landscape generator (TerraGenesis Perlin)
- Load heightmaps (either BMP or PNG)
- Progress dialog while generating worlds (no longer a 'hanging' screen)
- New dialogs for NewGame, Create Scenario and Play Heightmap
- Easier to configure your landscape
- More things to configure (tree-placer, ..)
- Speedup of world generation
- New console command 'restart': restart the map EXACTLY as it was when you
first started it (needs a game made after or with this commit)
- New console command 'getseed': get the seed of your map and share it with
others (of course only works with generated maps)
- Many new, world generation related, things
- Many internal cleanups and rewrites
Many tnx to those people who helped making this:
Belugas, DaleStan, glx, KUDr, RichK67, Rubidium, and TrueLight (alfabetic)
Many tnx to those who helped testing:
Arnau, Bjarni, and tokai (alfabetic)
And to all other people who helped testing and sending comments / bugs
Stats: 673 lines changed, 3534 new lines, 79 new strings
2006-08-19 10:00:30 +00:00
rubidium
243872b4fd
(svn r5887) -Cleanup: move date related functions, defines and variables to date.[ch]
...
-Cleanup: fix whitespace related coding style issues in date.[ch]
-Cleanup: make original comments doxygen compatible and remove/change outdated comments
2006-08-14 14:21:15 +00:00
tron
3254155930
(svn r5794) Pass the TileIndex plus x and y coordinates into GetSlopeZ_* instead of a TileInfo
2006-08-06 16:32:49 +00:00
tron
2b27073156
(svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectacular
2006-06-27 21:25:53 +00:00
tron
e5509d3b3e
(svn r5327) Use DrawFoundation() for houses
...
-Fix: Some graphical glitches on house tiles with foundations
-Fix: The selection cursor is now aligned with the top of the foundation for house tiles
2006-06-21 16:40:23 +00:00
tron
0a72639c2d
(svn r5210) Many small changes which piled up: const, unsigned, variable scope, CSE for readability, DeMorgan, if cascades -> switch, whitespace, parentheses, bracing, misc.
2006-06-10 08:37:41 +00:00
tron
7c1f1d823f
(svn r5171) Get rid of an ungly hack in the load routine, which temporarily turned house and road tiles into void tiles to calculate the closest town
2006-06-08 18:31:54 +00:00
tron
be88e269b9
(svn r5155) - Remove the bridge branch merge (revision r5070)
2006-06-07 19:35:21 +00:00
celestar
25a63ec7af
(svn r5070) Merged the bridge branch
...
-Feature: Bridges can now be placed above:
Any railway track combination (excluding depots and waypoints)
Any road combination (excluding depots)
Clear tiles (duh), including fields
Tunnel entrances
Bridge heads
Thanks to Tron for idea and implementation, KUDr for the yapf synchronization and many others for hours of testing
There are still a number of visual problems remaining, especially when electric railways are on or under the bridge.
DO NOT REPORT THOSE BUGS FOR THE TIME BEING please.
2006-06-02 13:05:41 +00:00
tron
2a3aca6139
(svn r4920) Remove parameters, which get only used in certain functions, by splitting those functions.
...
At least in the case of checking for oil industry restrictions this makes the check conditions more clear.
2006-05-20 16:46:37 +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
tron
18ad0ae50e
(svn r4572) Remove vehicle_leave_tile_proc
...
There's exactly one implemented function (unbarring a level crossing) and one place where it can be triggered (a train leaves a level crossing)
It's a bit overkill, so just handle this one case where it can happen
2006-04-25 07:32:33 +00:00
belugas
ebf6797678
(svn r4568) CodeChange : Bring definitions and uses of DrawTypesStructures toguether.
2006-04-24 21:10:56 +00:00
tron
c1dc517dab
(svn r4554) Replace magic numbers by TILE_{HEIGHT,SIZE}
2006-04-23 19:35:36 +00:00
tron
bbcdbb830b
(svn r4547) Revert a part of r4541 to silence an assertion for now
2006-04-23 17:58:07 +00:00
tron
0347fb2ab6
(svn r4541) Add a type for slopes and replace many magic numbers by the appropriate enums
2006-04-23 13:48:16 +00:00
peter1138
ae7ec5cd0d
(svn r4471) - Pools: Add a facility for calling a custom function during pool block clean up.
2006-04-18 18:48:50 +00:00
tron
81e6d68f95
(svn r4342) Change the first two parameters of commands - virtual pixel coordinates of the tile to operate on - to a TileIndex
...
Remove DoCommandByTile(), because now it does the same as DoCommand()
2006-04-10 07:15:58 +00:00
celestar
1b51ad3dde
(svn r4262) -Codechange: use IsClearWaterTile instead of some "home-brewn" marco. town_cmd is now map access free
2006-04-03 15:11:17 +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
celestar
c541a705f7
(svn r4254) -Codechange: Add and make use of map accessors for town lifts.
2006-04-03 11:46:28 +00:00
celestar
cc87f682b9
(svn r4249) -Codechange: Replace more occurences of 16 by TILE_SIZE and of 8 by TILE_HEIGHT. Reverted one change from the previous commit because it was faulty
2006-04-03 09:07:21 +00:00
tron
892a4c587d
(svn r4242) Pass TileIndex and slope to GetSlopeTileh_*() instead of TileInfo
2006-04-02 12:49:18 +00:00
celestar
7f134d238f
(svn r4190) -Codechange: Add and make use of an accessor function to create houses
2006-03-31 08:18:14 +00:00