summaryrefslogtreecommitdiff
path: root/src/landscape.cpp
AgeCommit message (Collapse)Author
2021-05-29Codechange: move from C-string to std::string for DoCommandrubidium42
2021-04-10Fix 70bc55cfd6e: snow line height was set while calculating desert line (#8989)Patric Stout
Seems I liked copy/pasting just a tiny bit too much.
2021-03-26Change: rename setting "max_heightlevel" to "map_height_limit"Patric Stout
This better reflects what it is, and hopefully removes a bit of the confusion people are having what this setting actually does. Additionally, update the text on the setting to better inform users what it is doing exactly, so they can make an educated decision on how to change it. Next commit will introduce an "auto" value, which should be the new default. The rename has as added benefit that everyone will start out on the "auto" value.
2021-03-26Feature: setting to indicate desert coverage for tropic climatePatric Stout
This is an indication value; the game tries to get as close as it can, but due to the complex tropic rules, that is unlikely to be exact. In the end, it picks a height-level to base the desert/tropic line on. This is strictly seen not needed, as we can convert any tile to either. But it is the simplest way to get started with this without redoing all related functions.
2021-03-26Feature: setting to indicate snow coverage for arctic climate (replaces snow ↵Patric Stout
line height) Setting the snow coverage (in % of the map) makes a lot more sense to the human, while still allowing the niche player to set (by finding the correct %) a snow line height they like. This makes for easier defaults, as it decoupled terrain height from amount of snow. Maps can never be 100% snow, as we do not have sprites for coastal tiles. Internally, this calculates the best snow line height to approach this coverage as close as possible.
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-01-08Codechange: Remove min/max functions in favour of STL variants (#8502)Charles Pigott
2020-12-27Codechange: Convert some more FIO functions to take std::string.Michael Lutz
2020-12-27Codechange: Replace assert_compile macro with static_assertCharles Pigott
2020-12-15Fix: for original terrain generator, keep a single gap of water at the ↵SamuXarick
borders (#7883) This means that for NE/NW, it should have one more in case of freeform-edges, and in case of SE/SW it should have one less. Reminder: freeform-edges only adds VOID tiles on X=0 and Y=0.
2020-07-03Fix: Globally apply preprocessor directive coding styleTechGeekNZ
Global; except for the 32-bit SSE blitter, which has some #DEFINEs in not-very-nice places.
2019-11-10Cleanup: Removed SVN headersS. D. Cloudt
2019-09-29Fix: Some typos found using codespellJMcKiern
2019-04-10Codechange: Use null pointer literal instead of the NULL macroHenry Wilson
2019-02-23Fix: Remove desert around lakes upon generationSamuXarick
2019-02-08Codechange: Make the style of MakeVoid calls uniform (#7192)Gabda
2019-01-31Codechange: [NPF] Add some consts.J0an Josep
2019-01-24Codechange: Unify tile height model in all functions (Patch by adf88, #6583)Johannes E. Krause
2019-01-24Fix: jumping effect when scrolling viewport over bottom edge of the map ↵Johannes E. Krause
(Patch by adf88, #6583)
2019-01-24Codechange: Add InverseRemapCoords2 function for remapping viewport ↵Johannes E. Krause
coordinates to underlying tile coordinates (Patch by adf88, #6583)
2018-07-19Feature: Framerate display window (#6822)Niels Martin Hansen
Frame rate and various game loop/graphics timing measurements and graphs. Accessible via the Help menu, and can print some stats in the console via the fps command.
2018-06-27Codechange: Silence -Wclass-memaccess warnings with GCC8Charles Pigott
2016-09-04(svn r27650) -Codechange: Replace SaveOrLoadMode by FileOperation and ↵alberth
DetailedFileType.
2016-09-04(svn r27635) -Codechange: Move FileType and FileToSaveLoad structure ↵alberth
definitions.
2014-10-13(svn r27009) -Add: extra level of general map heightness (ChillCore)rubidium
2014-09-21(svn r26883) -Change: make maximum desert height scale with the maximum ↵rubidium
configured height
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
2014-02-09(svn r26323) -Fix: update some constants related to map size.fonsinchen
2014-02-06(svn r26309) -Codechange: instead of memsetting a byte array with zero, use ↵rubidium
a set for marking the flow area of a river
2014-02-02(svn r26290) -Codechange: Use nicer orthogonal tile iterator constructor and ↵fonsinchen
simplify calculation of explosion points when clearing.
2013-10-12(svn r25849) -Codechange: Introduce IsTileFlat to not compute full slope ↵zuu
information for situations when we only want to know if a tile is flat or not (cirdan, LordAro)
2013-10-12(svn r25847) -Fix: Comment for GetFoundationSlope was wrong (cirdan, LordAro)zuu
2013-06-09(svn r25354) -Add: link graph schedule and typedefs for LinkGraph and ↵fonsinchen
related classes
2012-04-17(svn r24132) -Change [FS#4713]: Improve randomness of tile order in the tile ↵michi_cc
loop. (monoid)
2012-02-04(svn r23885) -Codechange: Use the GRF sprite loader for then mapgen sprites ↵michi_cc
as well.
2012-01-03(svn r23740) -Codechange: remove some 300 unneeded includes from the .cpp filesrubidium
2011-11-04(svn r23106) -Codechange: pass int* to GetTileSlope and friendsrubidium
2011-11-04(svn r23104) -Codechange: prepare the vehicle/sign z for some further ↵rubidium
changes to reduce casting
2011-11-04(svn r23099) -Codechange: remove pointless multiplications by TILE_HEIGHT ↵rubidium
for the water/river code
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 r23092) -Codechange: create a non-pixel version of some of the ↵rubidium
Get*PixelZ functions, and let Get*PixelZ wrap around the new function (multiplying the Z by TILE_HEIGHT) just like TileHeight and TilePixelHeight
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-11-04(svn r23090) -Codechange: use map accessors instead of directly accessing ↵rubidium
the map (mhl)
2011-11-03(svn r23084) -Codechange: get rid of a redundant variablerubidium
2011-08-21(svn r22808) -Change [FS#4740]: make it less likely that a one tile wide ↵rubidium
lake is created
2011-08-20(svn r22773) -Add: Some grass around rivers in desert areas.michi_cc
2011-08-20(svn r22768) -Add: progress bar updates for river buildingrubidium
2011-08-20(svn r22767) -Add: river generationrubidium
2011-07-17(svn r22670) -Change: Do not spawn explosion effects when bulldozing in ↵frosch
paused mode. They block the view.