Commit Graph

165 Commits (jgrpp)

Author SHA1 Message Date
Jonathan G Rennison 838b166726 Merge branch 'master' into jgrpp
# Conflicts:
#	src/cheat_gui.cpp
#	src/command.cpp
#	src/command_func.h
#	src/company_base.h
#	src/debug.cpp
#	src/debug.h
#	src/economy.cpp
#	src/engine_type.h
#	src/graph_gui.cpp
#	src/misc_cmd.cpp
#	src/misc_cmd.h
#	src/network/core/os_abstraction.cpp
#	src/openttd.cpp
#	src/saveload/saveload.cpp
#	src/saveload/saveload.h
#	src/settings_type.h
#	src/ship_cmd.cpp
#	src/stdafx.h
#	src/tests/bitmath_func.cpp
#	src/town_cmd.cpp
#	src/town_gui.cpp
3 months ago
Jonathan G Rennison 86a6f63e2f Merge branch 'master' into jgrpp
# Conflicts:
#	.github/workflows/ci-build.yml
#	.github/workflows/codeql.yml
#	.github/workflows/commit-checker.yml
#	.github/workflows/release-linux-legacy.yml
#	.github/workflows/release-linux.yml
#	.github/workflows/release-macos.yml
#	.github/workflows/release-windows-store.yml
#	.github/workflows/release-windows.yml
#	.github/workflows/upload-cdn.yml
#	.github/workflows/upload-gog.yml
#	.github/workflows/upload-steam.yml
#	src/console_cmds.cpp
#	src/core/math_func.hpp
#	src/fios.cpp
#	src/fios.h
#	src/intro_gui.cpp
#	src/network/network_server.cpp
#	src/openttd.cpp
#	src/settings.cpp
#	src/settings_gui.cpp
#	src/settings_internal.h
#	src/settings_table.cpp
#	src/settings_type.h
#	src/table/settings.h.preamble
#	src/table/settings/company_settings.ini
#	src/table/settings/currency_settings.ini
#	src/table/settings/difficulty_settings.ini
#	src/table/settings/economy_settings.ini
#	src/table/settings/game_settings.ini
#	src/table/settings/gui_settings.ini
#	src/table/settings/linkgraph_settings.ini
#	src/table/settings/locale_settings.ini
#	src/table/settings/misc_settings.ini
#	src/table/settings/multimedia_settings.ini
#	src/table/settings/network_private_settings.ini
#	src/table/settings/network_settings.ini
#	src/table/settings/news_display_settings.ini
#	src/table/settings/old_gameopt_settings.ini
#	src/table/settings/pathfinding_settings.ini
#	src/table/settings/script_settings.ini
#	src/table/settings/win32_settings.ini
#	src/table/settings/window_settings.ini
#	src/table/settings/world_settings.ini
#	src/viewport.cpp
#	src/viewport_func.h
#	src/window.cpp
3 months ago
Jonathan G Rennison 7ce06e22b8 Split date types into calendar and economy dates
See: 735abfe1
3 months ago
Patric Stout 7acf78964f
Remove: "generation_seed" from config, as it was a write-only value (#11927) 4 months ago
Patric Stout 4024bb5554
Fix #11910: use economy timer for dmp_cmds files (#11925) 4 months ago
Patric Stout e1673d5635 Fix #9722: create vital windows as soon as local_company is set (#11858)
Many places use local_company to detect whether world generation is
done, and blindly assume all vital windows exists when local_company
is set.

(cherry picked from commit f35e257adc)
4 months ago
Patric Stout 090616b4c9
Add: allow loading heightmaps from command-line (#11870)
If you want to load a file from tar, you have to give the file
inside the tar in order for it to work:

<tar-file>/<dir-in-tar>/<file>.png
4 months ago
Kuhnovic b38d3c2208
Change: simplified water region evaluation, removed savegame data (#11750) 4 months ago
Patric Stout f35e257adc
Fix #9722: create vital windows as soon as local_company is set (#11858)
Many places use local_company to detect whether world generation is
done, and blindly assume all vital windows exists when local_company
is set.
4 months ago
Jonathan G Rennison 936d636cdd No longer save/load water region invalidation states
Move InitializeWaterRegions to AllocateMap
No longer ForceUpdate in InitializeWaterRegions
4 months ago
Jonathan G Rennison 914b92b21f Merge branch 'master' into jgrpp
Bump savegame for water regions for ship pathfinder
Use ring_buffer for ShipPathCache
4 months ago
Kuhnovic f1e999ec59
Feature: Region-based pathfinder for ships (#10543) 4 months ago
Jonathan G Rennison 0a6639bd4b Avoid unnecessary airport/town noise recalculations during map generation 5 months ago
Jonathan G Rennison 03e0ec8276 Strong typedef: Use strong typedefs for date, date tick, minutes types
Add delta types
Adjust/add type conversion functions
Add various utility methods on types
Remove the various minute macros
Fix some minute conversion inconsistencies
5 months ago
Jonathan G Rennison a18f3274b4 Rename close window functions to match upstream 8 months ago
Jonathan G Rennison ac2f9a21e8 Move upstream saveload to src/saveload/, move jgrpp saveload to src/sl/
Leave afterload in src/saveload/
12 months ago
Rubidium 4de9b8a988 Codechange: use fmt::format to create desync dump savegames 12 months ago
Patric Stout 31ad990831
Codechange: move tick-counter into TimerGameTick (#10712) 1 year ago
Patric Stout 7aa2b9ab0a
Codechange: move all date-related variables inside the timer (#10706) 1 year ago
Jonathan G Rennison 2fcb735d7b Fix build window column sizes after map generation
See: #483
1 year ago
Jonathan G Rennison 4761750eae Fix asserts due to main window not existing yet
Partial revert of https://github.com/OpenTTD/OpenTTD/pull/10327
1 year ago
Rubidium fe2bcd2a58 Codechange: migrate size related functions to Map structure 1 year ago
Jonathan G Rennison 1bfd96c7f2 Merge branch 'master' into jgrpp
# Conflicts:
#	src/3rdparty/fmt/core.h
#	src/command_type.h
#	src/console_cmds.cpp
#	src/core/overflowsafe_type.hpp
#	src/landscape.cpp
#	src/network/network.cpp
#	src/newgrf_object.h
#	src/object_cmd.cpp
#	src/order_gui.cpp
#	src/saveload/vehicle_sl.cpp
#	src/script/api/script_industrytype.cpp
#	src/script/api/script_object.hpp
#	src/script/api/script_town.cpp
#	src/table/object_land.h
#	src/timetable_cmd.cpp
#	src/tree_cmd.cpp
#	src/vehicle_gui.cpp
#	src/window.cpp
1 year ago
Rubidium c5ff61c5f2 Add: script specific Randomizer instances 1 year ago
Rubidium bcfe0fb076 Codechange: introduce GetMainWindow() to properly account for nullptr checks
Some nullptr checks have been removed as they were not triggered with nullptr
with the null video driver and in dedicated server mode.
1 year ago
Jonathan G Rennison 3d7e5d5369 Avoid unnecessary viewport redraws for unused tile loop house triggers 2 years ago
Jonathan G Rennison 42e20d3d99 Industry: Determine which tiles in industry layouts are not animated
Do not set these as animated tiles for new industries
2 years ago
Jonathan G Rennison aeac77e012 Fix engine callbacks not being analysed in newly generated games 2 years ago
Jonathan G Rennison ed30542acf Cache highest snowline value 2 years ago
Jonathan G Rennison 34af4844d1 Merge branch 'master' into jgrpp 2 years ago
Michael Lutz 08a5478a93 Add: [NewGRF] Map seed as global variable.
This is useful to provide a feature-agnostic, stable random value that differs between games.
One of the possible uses is to e.g. use it to create pseudo-random regions for towns or industries.
2 years ago
Jonathan G Rennison 0b0d154788 Merge branch 'master' into jgrpp-beta
# Conflicts:
#	.github/workflows/ci-build.yml
#	src/lang/german.txt
#	src/lang/romanian.txt
#	src/lang/slovak.txt
#	src/lang/turkish.txt
#	src/network/core/address.cpp
#	src/network/core/tcp.h
#	src/network/core/udp.cpp
#	src/network/network.cpp
#	src/network/network_client.cpp
#	src/network/network_server.cpp
#	src/network/network_server.h
#	src/network/network_udp.cpp
#	src/openttd.cpp
#	src/saveload/newgrf_sl.cpp
#	src/tree_cmd.cpp
#	src/video/video_driver.hpp
#	src/window.cpp
#	src/window_gui.h
3 years ago
Jonathan G Rennison 5be32627b7 Fix extra aspects variable not being set for newly generated maps 3 years ago
Andreas Schmitt 150e502cf9 Add generation of public roads linking towns 3 years ago
rubidium42 55a11710a6 Codechange: convert printf DEBUG statements to fmt Debug statements 3 years ago
glx22 5799402f7a Codechange: Rename window related DeleteXXX to match new behaviour 3 years ago
Patric Stout b136e65cf9
Change: reworked the debug levels for network facility (#9251)
It now follows very simple rules:
0 - Fatal, user should know about this
1 - Error, but we are recovering
2 - Warning, wrong but okay if you don't know
3 - Info, information you might care about
4 -
5 - Debug #1 - High level debug messages
6 - Debug #2 - Low level debug messages
7 - Trace information
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
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.
3 years ago
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.
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 afadae6d50 Fix: abort world generation on exiting the game as soon as possible
This prevents the window from "freezing" when you close it during
world generation, as it first would continue the action.
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 edeced8fce Zstd: Enable zstd for autosaves
See also: https://github.com/OpenTTD/OpenTTD/pull/8773
3 years ago
Jonathan G Rennison 15fc3f5ba3 Fix generate world NewGRF error window being created without lock held 4 years ago
Jonathan G Rennison 3adeff1883 Merge branch 'master' into jgrpp
# Conflicts:
#	CMakeLists.txt
#	cmake/CompileFlags.cmake
#	src/bridge_gui.cpp
#	src/saveload/afterload.cpp
#	src/saveload/saveload.cpp
#	src/saveload/saveload.h
#	src/saveload/town_sl.cpp
#	src/screenshot.cpp
#	src/screenshot.h
#	src/toolbar_gui.cpp
#	src/town.h
#	src/town_cmd.cpp
4 years ago
Jonathan G Rennison ab3a373c73 Merge branch 'master' into jgrpp 5 years ago
glx22 ddffe32f15 Fix #7646: Incomplete cleanup for non-threaded world generation failure (#7805) 5 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