Commit Graph

33 Commits

Author SHA1 Message Date
Peter Nelson 9854553e10 Codechange: ZOOM_LVL_SHIFT/BASE are not actually ZOOM_LVLs.
Rename to ZOOM_BASE_SHIFT and ZOOM_BASE respectively, and derive from ZOOM_LVL instead of numeric value.
2024-04-04 22:27:03 +01:00
Rubidium 3a676a5af0 Codechange: replace static inline with static for non-class functions 2024-01-06 13:37:33 +01:00
Patric Stout 07730584d7
Codechange: make explicit when a TileIndex is cast to its basetype (#11190)
This prevents people accidentially assigning a TileIndex to a Date
or any other type they shouldn't.
2023-08-15 18:12:05 +02:00
Patric Stout 299570b2c1
Codechange: make TimerGameCalendar Date and Year types strongly typed (#10761) 2023-08-12 18:14:21 +00: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 b7a5d8e296 Codechange: add annotation to selectively force inlining in debug build 2023-01-28 20:32:45 +01:00
Michael Lutz b0990fcff7 Codechange: Make TileIndex a "strong" typedef to give it a distinct type.
This is accomplished by changing it to a single member struct with the
appropriate operator overloads to make it all work with not too much
source modifications.
2021-12-16 22:28:32 +01:00
Patric Stout f05e2e0d40 Feature: allow setting a custom terrain type to define highest peak
At least, TGP will try to reach it. It heavily depends on the map
if it is reachable at all. But for sure it will do its atmost to
get there!
2021-03-26 12:22:32 +01:00
Patric Stout 45c2c29c35 Add: allow setting the highest mountain for heightmaps
It will add some slack to the map height limit if that was set
to auto.
2021-03-26 12:22:32 +01:00
Patric Stout 422e132845 Feature: auto-detect map height limit based on generated map
This opens up the true power of the TGP terrain generator, as it
is no longer constrainted by an arbitrary low map height limit,
especially for extreme terrain types.

In other words: on a 1kx1k map with "Alpinist" terrain type, the
map is now really hilly with default settings.

People can still manually limit the map height if they so wish,
and after the terrain generation the limit is stored in the
savegame as if the user set it.

Cheats still allow you to change this value.
2021-03-26 12:22:32 +01:00
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.
2021-03-26 12:22:32 +01:00
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.
2021-03-26 12:22:32 +01:00
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.
2021-03-26 12:22:32 +01:00
Patric Stout 7463c46a54
Fix: for arctic and tropic, make sure we have at least a few hills (#8513)
Without hills, not all industries can be generated, which means
that with a default configuration you get errors. This is far from
optimal, of course.

This now forces that there is at least some hills, even when you
are using very-flat. This is a stopgap solution, but a proper
solution requires a full rewrite of the terrain generator, which
is not a 2 minute (or even 2 week) job.

To make sure flat is still flat-ish, reduce the default
snow-line-height to 10, making it look a lot better on smaller maps.
This is a compromise between being able to have flat maps and
still having all industries on arctic.
2021-01-08 12:02:38 +01:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
frosch 043274afd6 (svn r27987) -Change: Increase maximum allowed vehicle sprite size to reduce clipping of ships. 2018-03-11 13:25:26 +00:00
frosch 5558899621 (svn r27986) -Codechange: Name magic constants in the vehicle position hash functions. 2018-03-11 13:23:26 +00:00
frosch 2e1be6081d (svn r27148) -Fix: Rounding and unit-conversion inconsistencies in calls to MarkAllViewportsDirty. 2015-02-14 12:53:07 +00:00
rubidium fca729138d (svn r27010) -Feature [FS#4126]: more height levels (ic111, ChillCore, CommanderZ) 2014-10-13 14:30:59 +00:00
rubidium f41b55f0ff (svn r26880) -Add: stub settings for limiting bridge and map height 2014-09-21 11:27:34 +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
alberth 5add39d560 (svn r24540) -Codechange: Remove the not-so-useful HALF_TILE_SIZE constant. 2012-09-21 20:31:06 +00:00
smatz 4432f7799d (svn r21877) -Codechange: move definition of HALF_TILE_SIZE to tile_type.h 2011-01-21 15:48:52 +00:00
rubidium 3da3d131c6 (svn r20411) -Codechange: rename unmovables as quite a lot of them are actually movable; e.g. HQ and owned land are pretty movable. 2010-08-08 10:59:30 +00:00
rubidium 548dd91ef0 (svn r19816) -Codechange: use static const uint for the unnamed 'tile consts' enum as well 2010-05-13 11:19:30 +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
rubidium abb601f682 (svn r18585) -Codechange: replace some magic numbers by constants 2009-12-21 16:13:30 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
rubidium b66783afab (svn r16086) -Codechange: magic numbers substitutes by enums and some type safety 2009-04-18 21:10:36 +00:00
rubidium f1f5b248c2 (svn r14461) -Document: add some doxygen comments (Albert) 2008-10-13 03:26:48 +00:00
frosch 46589fa827 (svn r12020) -Documentation: Correct description of TropicZone. 2008-01-30 17:22:06 +00:00
rubidium aac835171e (svn r11700) -Codechange: reduce the amount of unnecessary includes. 2007-12-25 23:42:52 +00:00
rubidium 5b49e75453 (svn r11669) -Codechange: refactor tile.h -> tile_type.h and tile_map.h 2007-12-19 23:26:02 +00:00