Commit Graph

129 Commits (090616b4c9e1b554f1c8e33f108f668ed526d172)

Author SHA1 Message Date
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
5 months ago
Kuhnovic b38d3c2208
Change: simplified water region evaluation, removed savegame data (#11750) 5 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.
5 months ago
Kuhnovic f1e999ec59
Feature: Region-based pathfinder for ships (#10543) 5 months ago
Rubidium 4de9b8a988 Codechange: use fmt::format to create desync dump savegames 1 year 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
Rubidium fe2bcd2a58 Codechange: migrate size related functions to Map structure 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
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
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
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
glx22 ddffe32f15 Fix #7646: Incomplete cleanup for non-threaded world generation failure (#7805) 5 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
Charles Pigott 5b34c8019f Codechange: Remove Company/OwnerByte types 5 years ago
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 years ago
Michael Lutz 05bc2ed7cb Codechange: Replace custom thread code with C++11 thread objects.
We assume a conforming C++11 compiler environment that has a valid <thread>-header.
Failure to run a real thread is handled gracefully.
5 years ago
Michael Lutz 05f4e73608 Codechange: Replace custom mutex code with C++11 mutex'es.
A conforming compiler with a valid <mutex>-header is expected.
Most parts of the code assume that locking a mutex will never fail unexpectedly,
which is generally true on all common platforms that don't just pretend to
be C++11. The use of condition variables in driver code is checked.
5 years ago
Gabda 37bb2c9308 Codechange: Make the style of MakeVoid calls uniform (#7192) 5 years ago
frosch 31f046bd9b (svn r27670) -Add: [FS#6471] Assign descriptive names to (GNU pthread) threads. (JGR) 8 years ago
alberth 0adfb1ac6f (svn r27653) -Fix(r27647): Rename FileOperation enum and values to SaveLoadOperation to avoid nameclash with windows compiler toolkit. 8 years ago
alberth 597380e099 (svn r27650) -Codechange: Replace SaveOrLoadMode by FileOperation and DetailedFileType. 8 years ago
frosch 4d1843a95e (svn r27627) -Codechange: Deduplicate some cursor magic into SetMouseCursorBusy. 8 years ago
rubidium b476086c39 (svn r26538) -Codechange: remove double accounting of the drivers 10 years ago
rubidium aa5a570b0d (svn r26518) -Change: make genworld messages on the dedicated server disable-able by using -dnet=0 10 years ago
rubidium 5b82822c12 (svn r26486) -Codechange: replace a number of snprintfs with seprintf 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
frosch a32d18cbb9 (svn r26371) -Fix [FS#5831]: Calling DoCommandP during the gameloop cleared pending persistent storage changes. 10 years ago
frosch eca86d1baf (svn r26174) -Codechange: Rename BaseStorageArray to BasePersistentStorageArray 11 years ago
michi_cc 6f9668330e (svn r24132) -Change [FS#4713]: Improve randomness of tile order in the tile loop. (monoid) 12 years ago
rubidium 6d6be50ae0 (svn r23740) -Codechange: remove some 300 unneeded includes from the .cpp files 13 years ago
truebrain 83f2785f54 (svn r23611) -Add: run the begin of the script already while generating, and don't sleep on DoCommand while doing so 13 years ago
truebrain f239a61406 (svn r23609) -Add: save/load all GameScript related material 13 years ago
truebrain 561b25d031 (svn r23601) -Fix: fix the conflict in window number 13 years ago
rubidium 0ca25fb3af (svn r23480) -Fix [FS#4594]: replace OS error messages with internal error messages when that's possible 13 years ago
rubidium b231e80125 (svn r23470) -Codechange: move declaration of SwitchToMode to a header instead of declaring it in 6 other files 13 years ago
truebrain 160bfd8851 (svn r23376) -Remove: on popular demand, remove my (revoked) name from comments in the code. It was silly to name me like that to begin with ;) (based on patch by HackaLittleBit) 13 years ago
rubidium 38ad276acc (svn r22819) -Fix: include the header where it should be included 13 years ago
rubidium 9fe4b959ac (svn r22818) -Fix [FS#4742] (r22796, rlongago): don't spawn threads for world generation and NewGRF scanning when using the dedicated or null video driver regardless of the used blitter 13 years ago
rubidium e99aec39ef (svn r22789) -Codechange: rename generation window class to modal progress 13 years ago
rubidium 421053a694 (svn r22788) -Codechange: move modal progress related functions and variables to progress.cpp/h 13 years ago
rubidium 7b7869fba7 (svn r22786) -Codechange: rename genworld mutices to model_progress mutices 13 years ago
rubidium 7eba2bf4d3 (svn r21890) -Cleanup: remove some unneeded includes 14 years ago