Commit Graph

140 Commits

Author SHA1 Message Date
Patric Stout 970fedd78c Add: make modal windows update more smooth
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-03-10 13:41:18 +01:00
frosch d9b4413bc9
Codechange: rename sound ids to make more sense. (#8701) 2021-02-20 19:01:04 +01:00
SamuXarick a4035af337
Codechange: Apply coding style (#8640)
* 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-02-05 11:00:36 +01:00
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 2021-01-08 11:16:18 +01:00
Niels Martin Hansen 2d9fa81bd0 Feature: Plant clumps of trees in editor by dragging on the landscape 2020-12-27 01:03:27 +01:00
Pavel Stupnikov 22b9dec960
Feature: Add an option to disable tree growth completely (#8415) 2020-12-25 00:36:54 +01:00
Pavel Stupnikov 04e572933d
Fix: Don't lower tree density if spreading is not enabled (#8413) 2020-12-25 00:36:45 +01:00
dP 82572754dd Fix: Trees disappear completely after a few years when they're not allowed to spread 2020-05-20 13:16:55 +02:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00
frosch b4b98e5165 (svn r27893) -Codechange: Use fallthrough attribute. (LordAro) 2017-08-13 18:38:42 +00:00
frosch bfa3528069 (svn r27406) -Doc: Use same start/end tile convention in CmdPlantTree as in other TileArea commands. (HackaLittleBit) 2015-09-30 17:28:58 +00:00
rubidium 0463dbdc9e (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 2014-04-23 20:13:33 +00:00
frosch 3ce8d2ce70 (svn r24846) -Add: Advanced settings to disable certain sound effects. 2012-12-23 21:09:09 +00:00
michi_cc f3e295b4ec (svn r24134) -Add: Configurable limits for tree planting. 2012-04-17 19:43:52 +00:00
rubidium 6d6be50ae0 (svn r23740) -Codechange: remove some 300 unneeded includes from the .cpp files 2012-01-03 21:32:51 +00:00
yexo 5f79b4c5d1 (svn r23724) -Codechange: split of the check to see if ambient sounds are enabled to a header file allowing compilers to inline that check 2012-01-03 00:45:22 +00:00
yexo 5c838ff1c3 (svn r23168) -Feature [FS#1824]: always draw fences around field tiles 2011-11-08 19:48:47 +00:00
yexo 6a272233b3 (svn r23160) -Fix: wrong comments in a lot of TileTypeProcs definitions 2011-11-08 17:37:32 +00:00
michi_cc 3e016e4254 (svn r23116) -Fix (r23114): Ambient sound effect callback was called for unsupported tile types. 2011-11-04 22:59:23 +00:00
michi_cc 707b0f48e6 (svn r23114) -Feature: [NewGRF] Ambient sound effect callback. 2011-11-04 21:05:08 +00:00
rubidium 2a2c102b0b (svn r23108) -Codechange: more uint -> int / byte -> int conversions for Z related variables 2011-11-04 11:52:19 +00:00
rubidium 459c9523e8 (svn r23107) -Codechange: let GetSlopePixelZ and TerraformTile tile type functions use int z as well 2011-11-04 11:36:10 +00:00
rubidium 19eabdba2c (svn r23106) -Codechange: pass int* to GetTileSlope and friends 2011-11-04 11:30:37 +00:00
rubidium 69162621d8 (svn r23096) -Codechange: remove useless divisions and multiplications by TILE_HEIGHT for the snow line code 2011-11-04 10:25:58 +00:00
rubidium 2ed0f93bfb (svn r23093) -Codechange: add a default NULL for the Z of GetTileSlope and use it 2011-11-04 10:22:27 +00:00
rubidium 7757a2ed40 (svn r23091) -Codechange: rename some Get*Z functions to Get*PixelZ functions if they return the Z in pixels (like TilePixelHeight) 2011-11-04 10:18:13 +00:00
rubidium 0395aab420 (svn r22019) -Codechange: s/functions.h/clear_func.h/ 2011-02-07 22:38:02 +00:00
terkhen 9a7dd40006 (svn r20829) -Fix [FS#4094]: Place less trees at once when planting random trees at the scenario editor. 2010-09-18 20:48:40 +00:00
terkhen ee8272bacc (svn r20828) -Add: Take into account tree group placement at the world generation progress bar. 2010-09-18 20:44:13 +00:00
terkhen 95e5e59f37 (svn r20827) -Codechange: Simplify code for placement of tree groups. 2010-09-18 20:41:06 +00:00
terkhen 9ecf69684e (svn r20826) -Codechange: Simplify code for generating more trees above the snowline. 2010-09-18 20:36:13 +00:00
terkhen 3607c33b4f (svn r20825) -Codechange: Replace a few magic numbers by constants. 2010-09-18 20:33:04 +00:00
terkhen 80c43f52e8 (svn r20289) -Codechange: Unify fall through coding style. 2010-08-01 20:52:11 +00:00
frosch ed4f806f1d (svn r20283) -Codechange: Unify start of doygen comments. 2010-08-01 19:22:34 +00:00
rubidium e356cb9405 (svn r20281) -Codechange: unify case scope closure + break coding style 2010-08-01 18:53:30 +00:00
rubidium b8487afe54 (svn r20192) -Cleanup: bye bye variables.h, bye bye VARDEF... you won't be missed :) 2010-07-19 17:28:27 +00:00
rubidium 5a836cdec7 (svn r20187) -Codechange: move _tileh_to_sprite into a function in a more logical place and with a more descriptive name 2010-07-19 17:00:54 +00:00
rubidium 3bb544e54d (svn r20184) -Codechange: make _trees_tick_ctr and _disaster_delay not use VARDEF and put them in a more logical location 2010-07-19 15:51:06 +00:00
rubidium 39d421ff9c (svn r19644) -Fix [FS#3728]: don't allow building cacti outside of the 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-16 21:46:06 +00:00
frosch aea2252960 (svn r19634) -Codechange: Use TREE_INVALID more consistently. 2010-04-14 19:57:19 +00:00
rubidium f94c83a387 (svn r18872) -Codechange: introduce PaletteID and use it 2010-01-21 01:38:13 +00:00
rubidium 4d93b704d9 (svn r18866) -Codechange: remove the CmdFailed(ret)/CmdSucceeded(ret) wrapper functions 2010-01-18 22:57:21 +00:00
rubidium 82fc28f77f (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 2010-01-15 16:41:15 +00:00
yexo 509d533c51 (svn r18739) -Fix (r18719): building trees on snow with rocks underneed caused an assert 2010-01-06 09:08:43 +00:00
yexo 06842771a8 (svn r18738) -Fix (r18719): when a tree died while there was snow the amount of snow on the tile changed 2010-01-05 22:32:47 +00:00
rubidium b42e76d858 (svn r18723) -Codechange: also simplify looping over an area when building trees, desert, rocky areas or leveling land 2010-01-04 18:49:27 +00:00
yexo b378e82676 (svn r18719) -Feature: don't delete the rough/rocky status of a tile when it's covered by snow, this allows rocky tiles under snow if you have a variable snowline 2010-01-04 18:33:43 +00:00
rubidium 5e2b7e0238 (svn r18522) -Feature: add the possibility to not make new tree tiles in-game 2009-12-17 16:59:33 +00:00
rubidium c1c9a3e835 (svn r18398) -Fix [FS#3343]: the tree 'which one to draw' hash wasn't anywhere near random and thus showed a very visible repeated pattern when only one tree type was used 2009-12-04 16:57:35 +00:00