Commit Graph

171 Commits (ed1457dca335a68b74603b619584eff9f7231ef4)

Author SHA1 Message Date
Michael Lutz 2e39637db2 Codechange: Don't use a global for the 'not enough cash' message. 2 years ago
Michael Lutz c6d7b98808 Codechange: Un-bitstuff landscape commands. 2 years ago
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.
2 years ago
Michael Lutz 7048e1522f Codechange: Move flags in CommandProc in front of the command arguments. 2 years ago
Michael Lutz 33ca4f2b99 Codechange: Let the compile generate the master command table out of templated command traits.
This is using a non-intrusive type-traits like templated system, which
allows compile-time validation that the command table and the command
enum match up.
2 years ago
Michael Lutz b6933a2ebd Codechange: Move command arguments to the back of the DoCommand function call. 2 years ago
rubidium42 2e136285e1 Codechange: move from C-string to std::string for DoCommand 3 years ago
Patric Stout ff6924f122
Fix 70bc55cfd6e: snow line height was set while calculating desert line (#8989)
Seems I liked copy/pasting just a tiny bit too much.
3 years ago
Patric Stout 1a1049bc0d Change: rename setting "max_heightlevel" to "map_height_limit"
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.
3 years ago
Patric Stout 70bc55cfd6 Feature: setting to indicate desert coverage for tropic climate
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.
3 years ago
Patric Stout cafe4eed6e Feature: setting to indicate snow coverage for arctic climate (replaces snow 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.
3 years ago
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.
3 years ago
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 3 years ago
Michael Lutz 65f65ad2ad Codechange: Convert some more FIO functions to take std::string. 3 years ago
Charles Pigott 860c270c73 Codechange: Replace assert_compile macro with static_assert 3 years ago
SamuXarick 1d85d71d29
Fix: for original terrain generator, keep a single gap of water at the 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.
4 years ago
TechGeekNZ 716c883737 Fix: Globally apply preprocessor directive coding style
Global; except for the 32-bit SSE blitter, which has some #DEFINEs
in not-very-nice places.
4 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
JMcKiern 04f659e768 Fix: Some typos found using codespell 5 years ago
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 years ago
SamuXarick 4adb91202d Fix: Remove desert around lakes upon generation 5 years ago
Gabda 37bb2c9308 Codechange: Make the style of MakeVoid calls uniform (#7192) 5 years ago
J0an Josep 19be1f4ace Codechange: [NPF] Add some consts. 5 years ago
Johannes E. Krause c33596fe4a Codechange: Unify tile height model in all functions (Patch by adf88, #6583) 5 years ago
Johannes E. Krause f744dea0ff Fix: jumping effect when scrolling viewport over bottom edge of the map (Patch by adf88, #6583) 5 years ago
Johannes E. Krause f0290d5de7 Codechange: Add InverseRemapCoords2 function for remapping viewport coordinates to underlying tile coordinates (Patch by adf88, #6583) 5 years ago
Niels Martin Hansen 2a868b9f3b Feature: Framerate display window (#6822)
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.
6 years ago
Charles Pigott 5f86e1a390 Codechange: Silence -Wclass-memaccess warnings with GCC8 6 years ago
alberth 597380e099 (svn r27650) -Codechange: Replace SaveOrLoadMode by FileOperation and DetailedFileType. 8 years ago
alberth 9135f7130e (svn r27635) -Codechange: Move FileType and FileToSaveLoad structure definitions. 8 years ago
rubidium 8d90e86c2c (svn r27009) -Add: extra level of general map heightness (ChillCore) 10 years ago
rubidium cfe08b86c9 (svn r26883) -Change: make maximum desert height scale with the maximum configured height 10 years ago
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 10 years ago
fonsinchen e4c7c8876b (svn r26323) -Fix: update some constants related to map size. 10 years ago
rubidium f99d380583 (svn r26309) -Codechange: instead of memsetting a byte array with zero, use a set for marking the flow area of a river 10 years ago
fonsinchen dda4ffab5e (svn r26290) -Codechange: Use nicer orthogonal tile iterator constructor and simplify calculation of explosion points when clearing. 10 years ago
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) 11 years ago
zuu d908897918 (svn r25847) -Fix: Comment for GetFoundationSlope was wrong (cirdan, LordAro) 11 years ago
fonsinchen c32eea02dd (svn r25354) -Add: link graph schedule and typedefs for LinkGraph and related classes 11 years ago
michi_cc 6f9668330e (svn r24132) -Change [FS#4713]: Improve randomness of tile order in the tile loop. (monoid) 12 years ago
michi_cc 02d07e68d8 (svn r23885) -Codechange: Use the GRF sprite loader for then mapgen sprites as well. 13 years ago
rubidium 6d6be50ae0 (svn r23740) -Codechange: remove some 300 unneeded includes from the .cpp files 13 years ago
rubidium 19eabdba2c (svn r23106) -Codechange: pass int* to GetTileSlope and friends 13 years ago
rubidium f01b3e2721 (svn r23104) -Codechange: prepare the vehicle/sign z for some further changes to reduce casting 13 years ago
rubidium 0b6dbaf664 (svn r23099) -Codechange: remove pointless multiplications by TILE_HEIGHT for the water/river code 13 years ago
rubidium 69162621d8 (svn r23096) -Codechange: remove useless divisions and multiplications by TILE_HEIGHT for the snow line code 13 years ago
rubidium 2ed0f93bfb (svn r23093) -Codechange: add a default NULL for the Z of GetTileSlope and use it 13 years ago
rubidium a36551dbb4 (svn r23092) -Codechange: create a non-pixel version of some of the Get*PixelZ functions, and let Get*PixelZ wrap around the new function (multiplying the Z by TILE_HEIGHT) just like TileHeight and TilePixelHeight 13 years ago
rubidium 7757a2ed40 (svn r23091) -Codechange: rename some Get*Z functions to Get*PixelZ functions if they return the Z in pixels (like TilePixelHeight) 13 years ago
rubidium 47203dbeb5 (svn r23090) -Codechange: use map accessors instead of directly accessing the map (mhl) 13 years ago