Commit Graph
159 Commits
Author SHA1 Message Date
Rubidiumandrubidium42 8bac7bd519 Codechange: make SwitchMode a scoped enum 2026-05-31 07:22:11 +02:00
Rubidiumandrubidium42 2ff631caa2 Codechange: make GameMode a scoped enum 2026-05-30 23:20:20 +02:00
Peter NelsonandGitHub fce33c5015 Codechange: make WarningLevel a scoped enum (#15622) 2026-05-26 17:12:21 +01:00
Rubidiumandrubidium42 bcda4a72ee Codechange: make WindowClass a scoped enum 2026-05-20 21:39:04 +02:00
Tyler TrahanandGitHub 49c36f1b39 Codechange: Use enum class for GenWorldProgress (#15560) 2026-05-19 13:26:02 +00:00
Peter NelsonandGitHub 4a7cbf29f0 Codechange: prefer AutoRestoreBackup over Backup/Restore (#15480) 2026-04-27 08:02:41 +01:00
Jonathan G Rennisonandrubidium42 fd855aa61d Fix: Coordinate transformation for JSON town placement when anticlockwise 2026-04-16 16:48:44 +02:00
Peter NelsonandPeter Nelson 5aae8e2d64 Codechange: make Subdirectory a scoped enum 2026-04-05 21:46:07 +01:00
Peter NelsonandPeter Nelson 93a6aa77c6 Codechange: make SaveLoadOperation a scoped enum 2026-04-05 21:46:07 +01:00
Peter NelsonandPeter Nelson 04f7adb7b7 Codechange: make DetailedFileType a scoped enum 2026-04-05 21:46:07 +01:00
Rubidiumandrubidium42 4adf494ebc Codechange: enum-class-ify Commands 2026-01-28 23:32:51 +01:00
Cyprian KlimaszewskiandGitHub 99f04f27de Doc: Update information for receiving a copy of GPL. (#14869) 2025-12-07 11:25:08 +00:00
Peter NelsonandGitHub a1920fc225 Change: Scale towns/industries by amount of land tiles. (#10063) 2025-10-24 16:32:09 -04:00
Rubidiumandrubidium42 7c0f69a8fe Codefix: typos in comments and strings 2025-08-31 10:30:37 +02:00
Peter NelsonandGitHub ecafbf884e Add: Allow separate expansion of town buildings and roads in scenario editor. (#14341) 2025-06-07 13:56:43 +00:00
froschandfrosch b956af631e Codechange: Replace CircularTileSearch with SpiralTileSequence. 2025-04-20 12:50:45 +02:00
Loïc GuillouxandGitHub f35fa6679b Change: [Script] Start GS (but don't run it) when generating world in scenario editor (#13961) 2025-04-04 12:52:02 +02:00
Peter NelsonandPeter Nelson 2909a14374 Codechange: Include table/strings.h in files that use StringIDs.
Be consistent with how and where the file is incldued.
2025-03-21 12:53:40 +00:00
Rubidiumandrubidium42 fd4adc55e3 Codechange: replace INVALID_X with XID::Invalid() for PoolIDs 2025-02-16 20:23:00 +01:00
Peter NelsonandGitHub 2d7d085e8e Codechange: Use EncodedString for error messages. (#13569) 2025-02-16 10:04:32 +00:00
Rubidiumandrubidium42 672c5f0d98 Codefix: 'Short global name' 2025-02-15 21:06:28 +01:00
Rubidiumandrubidium42 c3d5e6d2a0 Codechange: Use EnumBitSet for DoCommandFlags 2025-02-14 00:28:57 +01:00
Peter NelsonandGitHub bf6293a13f Fix: Rail/road type conversion data is not populated on new game. (#13403)
This means that the rail/road type conversion that happens if NewGRFs are changed does not work the first time for a new game, only with a savegame.
2025-01-29 21:45:16 +00:00
Peter NelsonandGitHub 4be3361aa3 Fix ad020759: Update town data loader for FileHandle change. (#12942)
A non-conflicting merge conflict...
2024-09-16 17:52:24 +01:00
Tyler TrahanandGitHub ad020759c7 Feature: Import town data from JSON file (#10409) 2024-09-16 09:29:10 -04:00
Peter NelsonandGitHub 48eb9b8bc9 Add: Check that towns can build roads before generating map. (#12503) 2024-04-16 15:25:07 +00:00
Peter NelsonandMichael Lutz 3e83dcedfd Codechange: Allocate houses dynamically instead of from a fixed array.
This uses vectors for HouseSpecs and global/town building counts.
2024-03-28 23:23:00 +01:00
Rubidiumandrubidium42 bab5a8a787 Codechange: use std::source_location over __FILE__ and __LINE__ for Backup 2024-03-10 10:14:20 +01:00
Patric StoutandGitHub 7acf78964f Remove: "generation_seed" from config, as it was a write-only value (#11927) 2024-01-30 17:02:35 +00:00
Patric StoutandGitHub 4024bb5554 Fix #11910: use economy timer for dmp_cmds files (#11925) 2024-01-29 21:58:22 +00:00
Patric StoutandGitHub 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
2024-01-22 22:35:25 +00:00
KuhnovicandGitHub b38d3c2208 Change: simplified water region evaluation, removed savegame data (#11750) 2024-01-21 20:56:50 +00:00
Patric StoutandGitHub 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.
2024-01-21 17:36:33 +00:00
KuhnovicandGitHub f1e999ec59 Feature: Region-based pathfinder for ships (#10543) 2024-01-08 20:29:05 +01:00
Rubidiumandrubidium42 4de9b8a988 Codechange: use fmt::format to create desync dump savegames 2023-06-07 08:02:58 +02:00
Patric StoutandGitHub 31ad990831 Codechange: move tick-counter into TimerGameTick (#10712) 2023-04-24 16:55:40 +00:00
Patric StoutandGitHub 7aa2b9ab0a Codechange: move all date-related variables inside the timer (#10706) 2023-04-24 15:56:01 +00:00
Rubidiumandrubidium42 fe2bcd2a58 Codechange: migrate size related functions to Map structure 2023-01-21 17:11:40 +01:00
Rubidiumandrubidium42 c5ff61c5f2 Add: script specific Randomizer instances 2023-01-14 22:00:11 +01:00
Rubidiumandrubidium42 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.
2023-01-14 21:15:23 +01:00
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.
2022-03-13 14:20:23 +01:00
rubidium42andrubidium42 55a11710a6 Codechange: convert printf DEBUG statements to fmt Debug statements 2021-06-13 12:45:45 +02:00
glx22andLoïc Guilloux 5799402f7a Codechange: Rename window related DeleteXXX to match new behaviour 2021-05-29 21:08:25 +02:00
Patric StoutandGitHub 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
2021-05-12 16:34:02 +02:00
Patric StoutandPatric 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 StoutandPatric 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 StoutandPatric 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 StoutandPatric 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.
2021-03-10 13:41:18 +01:00
Patric StoutandPatric 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.
2021-03-10 13:41:18 +01:00
glx22andCharles Pigott ddffe32f15 Fix #7646: Incomplete cleanup for non-threaded world generation failure (#7805) 2019-11-14 20:13:15 +00:00