Commit Graph

355 Commits (38571cf0daea6f9e4ec56f489df0c9a282ef94f4)

Author SHA1 Message Date
Jonathan G Rennison 3d857333c8 Reduce delays with company bankrupcty/sale processing at high day lengths 2 years ago
Jonathan G Rennison 1714773457 Adjust baseline for arctic snowline dynamic width setting to lower value 2 years ago
Jonathan G Rennison 452d22ce37 Add setting for width of dynamic snowline range for arctic tree placement
Default: 75%
2 years ago
Jonathan G Rennison ed30542acf Cache highest snowline value 2 years ago
Jonathan G Rennison ef379b5214 Fix DC_FORCE_CLEAR_TILE water removal not removing docking tiles
See: https://github.com/OpenTTD/OpenTTD/issues/9869
2 years ago
Jonathan G Rennison 39d39a5c61 Reduce duplication in desert or rainforeset data search arrays 2 years ago
reldred 3bf2e850a5 undo the mess I made of JGR's fixes to my janky code 2 years ago
reldred e3e032518b Merge branch 'desert-tweaks' of https://github.com/reldred/OpenTTD-patches into desert-tweaks 2 years ago
reldred 59022c40f9 adjustments;
added lake tropic width adjustment
added an extra large setting to the coasts (51radius)
set minimum width for rivers and lakes to 2 (setting it to 1 actually CTD'd the game)
made max for rivers and lakes be 51 tiles to match the 51tiles of the coast setting.
2 years ago
Jonathan G Rennison f1b6eb932f Reduce duplication in CreateDesertOrRainForest 2 years ago
reldred 22305e8795 Allows configuring the width of the coast in tropic maps that generates as tropiczone_normal before the desert kicks in, it does this by creating two additional arrays which house the coordinates to create a filled circle of radius of 19 tiles, and 25 tiles. the default creates a radius of 13 tiles.
I'd eventually like to add an Extra Large setting but manually creating the array of coordinates is horrible.

I wedged this setting in beside the setting for tropic width around rivers despite it not fitting into the rivers/lakes category because it still feels the most relevant place for now.
2 years ago
reldred 5a53b4d846 Additional tweaks to allow rivers to spawn in deserts (causing aditional tropic biome to spawn around them). This piggybacks off of the 'allow lakes in deserts' setting, renaming it to cover both. The actual setting name itself internally hasn't changed. 3 years ago
Andreas Schmitt 7601720ff7 landscape.cpp fixes 3 years ago
Andreas Schmitt 44fe1ca00b Tweak the bridge generation 3 years ago
Andreas Schmitt 8d584990aa Remove unused hash functions and start the road building from the map center 3 years ago
Andreas Schmitt da4de2c959 Improve lake generation
Prior to this change, lakes could be very small and could also not be deactivated.

This change allows the deactivation of lake creation and the lake size is now the set size +- 25% instead of anything between 0 and lake_size.
3 years ago
Andreas Schmitt 99e32488f2 Add creation of wide rivers 3 years ago
Jonathan G Rennison 1ef236525a Mapgen: Generate fuzzy ellipse shaped lakes instead of squares 3 years ago
Jonathan G Rennison f39b6f4ba3 Merge branch 'master' into jgrpp
# Conflicts:
#	src/cheat_gui.cpp
#	src/genworld_gui.cpp
#	src/landscape.cpp
#	src/lang/english.txt
#	src/saveload/afterload.cpp
#	src/screenshot.cpp
#	src/settings_gui.cpp
#	src/settings_internal.h
#	src/settings_type.h
#	src/table/settings.ini
#	src/tile_type.h
#	src/widgets/genworld_widget.h
3 years ago
Jonathan G Rennison 5e14b54a0c Merge branch 'master' into jgrpp 3 years ago
reldred 213b6fe6ef Add PR #231: More river configuration options 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
reldred 07397783f8 Allows configuring the height at which rainforests start, which by default was controlled by dividing the map maxheight by 4 in landscape.cpp. Default setting is 8 which matches and should provide default behavior in new map creation. 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
Jonathan G Rennison 2e20da40ed Cache current value of snow line height 3 years ago
Jonathan G Rennison b7ddd486cf Merge branch 'master' into jgrpp
# Conflicts:
#	cmake/CompileFlags.cmake
#	src/aircraft_cmd.cpp
#	src/blitter/32bpp_anim.cpp
#	src/cargopacket.cpp
#	src/cheat_gui.cpp
#	src/company_cmd.cpp
#	src/company_gui.cpp
#	src/core/pool_func.hpp
#	src/date.cpp
#	src/economy.cpp
#	src/error_gui.cpp
#	src/ground_vehicle.cpp
#	src/ground_vehicle.hpp
#	src/group_gui.cpp
#	src/industry_cmd.cpp
#	src/lang/dutch.txt
#	src/lang/french.txt
#	src/lang/german.txt
#	src/linkgraph/linkgraph_gui.cpp
#	src/linkgraph/mcf.cpp
#	src/network/network_content.cpp
#	src/network/network_server.cpp
#	src/network/network_udp.cpp
#	src/newgrf_engine.cpp
#	src/newgrf_station.cpp
#	src/order_cmd.cpp
#	src/order_gui.cpp
#	src/pathfinder/follow_track.hpp
#	src/pathfinder/yapf/yapf_common.hpp
#	src/saveload/saveload.cpp
#	src/settings_gui.cpp
#	src/station_cmd.cpp
#	src/station_kdtree.h
#	src/string_func.h
#	src/table/settings.ini
#	src/tgp.cpp
#	src/timetable_cmd.cpp
#	src/timetable_gui.cpp
#	src/toolbar_gui.cpp
#	src/town_cmd.cpp
#	src/train_cmd.cpp
#	src/train_gui.cpp
#	src/tree_gui.cpp
#	src/tunnelbridge_cmd.cpp
#	src/vehicle.cpp
#	src/vehicle_gui.cpp
#	src/video/sdl2_v.cpp
#	src/video/sdl_v.cpp
#	src/video/win32_v.cpp
#	src/viewport.cpp
#	src/viewport_sprite_sorter_sse4.cpp
#	src/window.cpp
3 years ago
Jonathan G Rennison 6c3e5642f8 Merge branch 'master' into jgrpp
# Conflicts:
#	cmake/CompileFlags.cmake
#	src/crashlog.cpp
#	src/fileio.cpp
#	src/fileio_func.h
#	src/fios_gui.cpp
#	src/ini_load.cpp
#	src/ini_type.h
#	src/lang/english.txt
#	src/lang/german.txt
#	src/lang/korean.txt
#	src/network/network_client.cpp
#	src/order_base.h
#	src/order_cmd.cpp
#	src/os/windows/win32.cpp
#	src/road_cmd.cpp
#	src/saveload/saveload.cpp
#	src/saveload/saveload.h
#	src/settings.cpp
#	src/station_cmd.cpp
#	src/stdafx.h
#	src/table/settings.ini
#	src/tree_cmd.cpp
#	src/tree_gui.cpp
#	src/vehicle_base.h
#	src/video/cocoa/cocoa_v.mm
#	src/video/cocoa/event.mm
#	src/video/cocoa/wnd_quartz.mm
#	src/viewport.cpp
#	src/widgets/tree_widget.h
3 years ago
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 3 years ago
SamuXarick aaeb36e95d 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.
(cherry picked from commit 1d85d71d29)
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
Jonathan G Rennison 946442ab6b GRF: Add extra road/tram type flag: towns cannot modify tiles 4 years ago
Jonathan G Rennison 737ced9f50 Merge branch 'master' into jgrpp 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
Jonathan G Rennison cbdd9f84d8 Merge branch 'master' into jgrpp
# Conflicts:
#	src/console_gui.cpp
#	src/lang/korean.txt
#	src/video/sdl2_v.cpp
#	src/video/sdl2_v.h
#	src/window.cpp
#	src/window_gui.h
5 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
Jonathan G Rennison edfd378e93 Merge branch 'master' into jgrpp
# Conflicts:
#	source.list
#	src/blitter/32bpp_anim.cpp
#	src/linkgraph/linkgraphjob.cpp
#	src/order_cmd.cpp
#	src/vehicle.cpp
#	src/vehicle_type.h
5 years ago
JMcKiern 04f659e768 Fix: Some typos found using codespell 5 years ago
Jonathan G Rennison 674732cd68 Merge: Codechange: Use null pointer literal instead of the NULL macro 5 years ago
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 years ago
Jonathan G Rennison 7ff252c58d Merge branch 'master' into jgrpp
# Conflicts:
#	Makefile.src.in
#	findversion.sh
#	projects/determineversion.vbs
#	src/aircraft_cmd.cpp
#	src/lang/dutch.txt
#	src/linkgraph/linkgraph_gui.cpp
#	src/linkgraph/linkgraph_gui.h
#	src/order_cmd.cpp
#	src/settings_gui.cpp
#	src/smallmap_gui.cpp
#	src/town_cmd.cpp
#	src/viewport.cpp
#	src/water_map.h
5 years ago
SamuXarick 4adb91202d Fix: Remove desert around lakes upon generation 5 years ago
Jonathan G Rennison 2fdcc52321 Merge branch 'save_ext' into jgrpp
# Conflicts:
#	Makefile.src.in
#	findversion.sh
#	projects/determineversion.vbs
#	src/lang/dutch.txt
#	src/lang/korean.txt
#	src/network/network.cpp
#	src/network/network_client.cpp
#	src/rail.cpp
#	src/rail_cmd.cpp
#	src/saveload/afterload.cpp
#	src/ship_cmd.cpp
#	src/toolbar_gui.cpp
#	src/vehicle.cpp
5 years ago
Gabda 37bb2c9308 Codechange: Make the style of MakeVoid calls uniform (#7192) 5 years ago
Jonathan G Rennison 9d3b77c5a2 Merge branch 'master' into jgrpp
# Conflicts:
#	src/fios_gui.cpp
#	src/lang/english.txt
#	src/lang/german.txt
5 years ago
J0an Josep 19be1f4ace Codechange: [NPF] Add some consts. 5 years ago
Jonathan G Rennison 281d346fe2 Merge branch 'master' into jgrpp
# Conflicts:
#	bin/baseset/no_sound.obs
#	bin/baseset/orig_dos.obg
#	bin/baseset/orig_dos.obs
#	bin/baseset/orig_dos_de.obg
#	bin/baseset/orig_win.obg
#	bin/baseset/orig_win.obm
#	bin/baseset/orig_win.obs
#	src/aircraft_cmd.cpp
#	src/blitter/32bpp_anim.cpp
#	src/blitter/32bpp_anim.hpp
#	src/blitter/32bpp_base.cpp
#	src/blitter/32bpp_base.hpp
#	src/blitter/8bpp_base.cpp
#	src/blitter/8bpp_base.hpp
#	src/blitter/common.hpp
#	src/group_gui.cpp
#	src/lang/korean.txt
#	src/linkgraph/linkgraph_gui.cpp
#	src/saveload/saveload.cpp
#	src/town_cmd.cpp
#	src/viewport.cpp
#	src/viewport_func.h
5 years ago