Commit Graph

117 Commits

Author SHA1 Message Date
Patric Stout a3cfd23cf9
Codechange: rename byte to uint8_t (#12308) 2024-03-16 23:59:32 +01:00
Rubidium 27eadc13ec Codechange: rename TILE_ADD(XY) to TileAdd(XY) 2024-03-10 15:50:24 +01:00
Michael Lutz 8dda387f82 Codechange: Use std::tuple for slope functions with two return values 2024-03-08 18:08:55 +01:00
Peter Nelson d6c5efd795 Change: Draw north-side farm fences/hedges/walls on tile edge, instead of 1/16th in.
This matches original TTD drawing behaviour, which is what the original baseset sprites are designed for, and avoids alignment issues (which are more problematic with high detail 4x sprites.)
2024-02-11 22:10:46 +01:00
frosch b6c8f301be Codechange: Silence warnings about intentionally unused parameters. 2023-09-19 22:49:59 +02:00
Rubidium eaae0bb5e7 Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
2023-07-19 19:30:14 +02:00
Rubidium e8af8daa68 Codechange: pass "ground vehicle" to GetTileSlopeZ since for tunnel/bridges there are two states
Previously it checked the position in non-driving direction to "guess" whether
a ground vehicle was using the function, so on tunnels/bridges it could either
return the Z of the (virtual) ground compared to the Z of the path the vehicle
would take.
2023-04-09 19:00:26 +02:00
SamuXarick 46dc6da270
Codechange: Make void tiles flood edge tiles, instead of edge tiles flooding themselves (#8517) 2023-01-26 21:57:25 +01:00
Rubidium fe2bcd2a58 Codechange: migrate size related functions to Map structure 2023-01-21 17:11:40 +01:00
Michael Lutz c6d7b98808 Codechange: Un-bitstuff landscape commands. 2021-12-16 22:28:32 +01:00
Michael Lutz e740c24eb7 Codechange: Template DoCommand to automagically reflect the parameters of the command proc.
When finished, this will allow each command handler to take individually
different parameters, obliviating the need for bit-packing.
2021-12-16 22:28:32 +01:00
Michael Lutz b6933a2ebd Codechange: Move command arguments to the back of the DoCommand function call. 2021-12-16 22:28:32 +01:00
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
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 2021-01-08 11:16:18 +01: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
Andy ad5a9daed5 Change: Desert tiles are now half-desert if a neighboured tile is non-desert or sea/coast. (patch by frosch123) #4754 (#7015) 2019-01-09 18:48:08 +01:00
frosch 071518f571 (svn r27657) -Change: Replace another occurence of the ancient tilehash function with the newer one. This time to make rough land appear more random. 2016-10-02 13:41:56 +00:00
frosch 4d310eafc5 (svn r27200) -Feature/Fix [FS#6260]: [NewGRF] Add Misc. GRF Feature Flag 6 to enable the second rocky tile set. 2015-03-20 19:27:15 +00:00
frosch 862e16aa7e (svn r27117) -Fix/Feature: Make use of both rocky tile sets from the base graphics. 2015-01-10 20:10:51 +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
zuu fb5dc7762b (svn r25852) -Codechange: Merge GetFenceXX/SetFenceXX into one common GetFonce/SetFence for all directions that take an extra direction parameter (cirdan, LordAro) 2013-10-12 22:23:43 +00:00
zuu a42f223b2b (svn r25851) -Codechange: Avoid recalculations in DrawClearLandFence (cirdan, LordAro) 2013-10-12 22:21:21 +00:00
zuu dfb5663313 (svn r25849) -Codechange: Introduce IsTileFlat to not compute full slope information for situations when we only want to know if a tile is flat or not (cirdan, LordAro) 2013-10-12 22:07:58 +00:00
planetmaker c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 2013-01-08 22:46:42 +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 707b0f48e6 (svn r23114) -Feature: [NewGRF] Ambient sound effect callback. 2011-11-04 21:05:08 +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 798f5a8608 (svn r23102) -Codechange: remove the remaining pointless multiplications by TILE_HEIGHT 2011-11-04 10:31:46 +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 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 47c5d30b5d (svn r23084) -Codechange: get rid of a redundant variable 2011-11-03 22:49:03 +00:00
rubidium 0395aab420 (svn r22019) -Codechange: s/functions.h/clear_func.h/ 2011-02-07 22:38:02 +00:00
rubidium 7eba2bf4d3 (svn r21890) -Cleanup: remove some unneeded includes 2011-01-22 14:52:20 +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
smatz 173b56b895 (svn r19768) -Fix: half-desert tiles would never revert back to clear tiles 2010-05-08 14:36:56 +00:00
yexo a43a23b408 (svn r18945) -Codechange: typo 2010-01-29 00:11:30 +00:00
smatz 84bc831e32 (svn r18856) -Codechange: do not call GetSlopeZInCorner() when there's no fence to draw 2010-01-18 12:09:25 +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 6dcfa9a063 (svn r18728) -Fix: don't mark all tiles dirty in the artic tileloop 2010-01-04 22:26:25 +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
frosch a9d4147eb2 (svn r18702) -Fix [FS#3467]: Enable DrawGroundSpriteAt() to deal with foundations as DrawGroundSprite() does, and use this for drawing one-way-road-signs and clear-land-fences. 2010-01-03 20:55:00 +00:00
alberth d86dbabbc4 (svn r18670) -Fix [FS#3455]: Update all tiles when snowline height changes in larger steps than one tile. 2009-12-30 19:30:49 +00:00
frosch ba1fc280e3 (svn r18005) -Codechange: Convert the Prices struct into an array and an enum. 2009-11-07 22:47:54 +00:00
rubidium d6cded5380 (svn r17693) -Cleanup: remove some unneeded includes 2009-10-04 17:16:41 +00:00