summaryrefslogtreecommitdiff
path: root/src/tree_cmd.cpp
AgeCommit message (Collapse)Author
2021-06-01Fix b791ffc6: use the correct name in CmdPlantTreeVít Šefl
2021-05-29Codechange: move from C-string to std::string for DoCommandrubidium42
2021-05-27Fix: do not hide parameter by local variable with the same namerubidium42
2021-05-13Codechange: Replace TILE_AREA_LOOP with range-based for loopsglx22
2021-05-12Fix #9242: Tree tick handler did not scale by map size. (#9246)PeterN
This means that random tree generation density is higher on small maps and lower on large maps. This difference is enough to make the Lumber Mill impractical to use on large maps. This change skips ticks on maps smaller than 256x256 and increases iterations or shortens the interval on maps larger than 256x256.
2021-03-10Add: make modal windows update more smoothPatric Stout
Basically, modal windows had their own thread-locking for what drawing was possible. This is a bit nonsense now we have a game-thread. And it makes much more sense to do things like NewGRFScan and GenerateWorld in the game-thread, and not in a thread next to the game-thread. This commit changes that: it removes the threads for NewGRFScan and GenerateWorld, and just runs the code in the game-thread. On regular intervals it allows the draw-thread to do a tick, which gives a much smoother look and feel. It does slow down NewGRFScan and GenerateWorld ever so slightly as it spends more time on drawing. But the slowdown is not measureable on my machines (with 700+ NewGRFs / 4kx4k map and a Debug build). Running without a game-thread means NewGRFScan and GenerateWorld are now blocking.
2021-02-20Codechange: rename sound ids to make more sense. (#8701)frosch
2021-02-05Codechange: Apply coding style (#8640)SamuXarick
* Fix: Missing or needed spaces * Codechange: Remove space * Codechange: Remove space * Codechange: More missing spaces * Codechange: Missing spaces * Codechange: Remove space * Codechange: Remove space
2021-01-08Codechange: Remove min/max functions in favour of STL variants (#8502)Charles Pigott
2020-12-27Feature: Plant clumps of trees in editor by dragging on the landscapeNiels Martin Hansen
2020-12-25Feature: Add an option to disable tree growth completely (#8415)Pavel Stupnikov
2020-12-25Fix: Don't lower tree density if spreading is not enabled (#8413)Pavel Stupnikov
2020-05-20Fix: Trees disappear completely after a few years when they're not allowed ↵dP
to spread
2019-11-10Cleanup: Removed SVN headersS. D. Cloudt
2019-04-10Codechange: Use null pointer literal instead of the NULL macroHenry Wilson
2017-08-13(svn r27893) -Codechange: Use fallthrough attribute. (LordAro)frosch
2015-09-30(svn r27406) -Doc: Use same start/end tile convention in CmdPlantTree as in ↵frosch
other TileArea commands. (HackaLittleBit)
2014-04-23(svn r26482) -Codechange: add an include that allows us to undefine/redefine ↵rubidium
"unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values
2012-12-23(svn r24846) -Add: Advanced settings to disable certain sound effects.frosch
2012-04-17(svn r24134) -Add: Configurable limits for tree planting.michi_cc
2012-01-03(svn r23740) -Codechange: remove some 300 unneeded includes from the .cpp filesrubidium
2012-01-03(svn r23724) -Codechange: split of the check to see if ambient sounds are ↵yexo
enabled to a header file allowing compilers to inline that check
2011-11-08(svn r23168) -Feature [FS#1824]: always draw fences around field tilesyexo
2011-11-08(svn r23160) -Fix: wrong comments in a lot of TileTypeProcs definitionsyexo
2011-11-04(svn r23116) -Fix (r23114): Ambient sound effect callback was called for ↵michi_cc
unsupported tile types.
2011-11-04(svn r23114) -Feature: [NewGRF] Ambient sound effect callback.michi_cc
2011-11-04(svn r23108) -Codechange: more uint -> int / byte -> int conversions for Z ↵rubidium
related variables
2011-11-04(svn r23107) -Codechange: let GetSlopePixelZ and TerraformTile tile type ↵rubidium
functions use int z as well
2011-11-04(svn r23106) -Codechange: pass int* to GetTileSlope and friendsrubidium
2011-11-04(svn r23096) -Codechange: remove useless divisions and multiplications by ↵rubidium
TILE_HEIGHT for the snow line code
2011-11-04(svn r23093) -Codechange: add a default NULL for the Z of GetTileSlope and ↵rubidium
use it
2011-11-04(svn r23091) -Codechange: rename some Get*Z functions to Get*PixelZ ↵rubidium
functions if they return the Z in pixels (like TilePixelHeight)
2011-02-07(svn r22019) -Codechange: s/functions.h/clear_func.h/rubidium
2010-09-18(svn r20829) -Fix [FS#4094]: Place less trees at once when planting random ↵terkhen
trees at the scenario editor.
2010-09-18(svn r20828) -Add: Take into account tree group placement at the world ↵terkhen
generation progress bar.
2010-09-18(svn r20827) -Codechange: Simplify code for placement of tree groups.terkhen
2010-09-18(svn r20826) -Codechange: Simplify code for generating more trees above the ↵terkhen
snowline.
2010-09-18(svn r20825) -Codechange: Replace a few magic numbers by constants.terkhen
2010-08-01(svn r20289) -Codechange: Unify fall through coding style.terkhen
2010-08-01(svn r20283) -Codechange: Unify start of doygen comments.frosch
2010-08-01(svn r20281) -Codechange: unify case scope closure + break coding stylerubidium
2010-07-19(svn r20192) -Cleanup: bye bye variables.h, bye bye VARDEF... you won't be ↵rubidium
missed :)
2010-07-19(svn r20187) -Codechange: move _tileh_to_sprite into a function in a more ↵rubidium
logical place and with a more descriptive name
2010-07-19(svn r20184) -Codechange: make _trees_tick_ctr and _disaster_delay not use ↵rubidium
VARDEF and put them in a more logical location
2010-04-16(svn r19644) -Fix [FS#3728]: don't allow building cacti outside of the ↵rubidium
desert or rain forest trees outside of the rain forest area. This to prevent people from thinking planting rain forest trees makes the rain forest bigger and thus adds more place to build a lumber mill.
2010-04-14(svn r19634) -Codechange: Use TREE_INVALID more consistently.frosch
2010-01-21(svn r18872) -Codechange: introduce PaletteID and use itrubidium
2010-01-18(svn r18866) -Codechange: remove the CmdFailed(ret)/CmdSucceeded(ret) ↵rubidium
wrapper functions
2010-01-15(svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, ↵rubidium
if a header require a header make it include that header
2010-01-06(svn r18739) -Fix (r18719): building trees on snow with rocks underneed ↵yexo
caused an assert