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
2021-05-12 16:34:02 +02: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
23f27db8c3
Change: remove "maximum map height" from the New Game GUI
...
This setting influence the max heightlevel, and not as the name
suggests: the height of the generated map.
How ever you slice it, it is a very weird place to add this
setting, and it is better off being only in the settings menu.
Commits following this commit also make it more useful, so users
no longer have to care about it.
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
751434ea63
Fix: placing random trees in SE crashes the game ( #8892 )
...
This used to work by accident: originally the code checked if
GenerateWorld was threaded. If not, it would abort the function.
This worked for placing trees, because it was also returning false
when it was not active.
With the recent changes, that check got removed, and this crash
started to happen. So now check if we have a modal window, which
is a very solid indication we are generating the world.
2021-03-25 11:57:28 +01:00
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.
2021-03-10 13:41:18 +01:00
Patric Stout
8bf8c0f251
Fix d437445c: also use std::chrono for the GRFFileScanner modal window
...
For some reason I only converted one of the two modal windows we
have, and completely forgot the other.
While at it, synchronize the way those two modal windows work
in terms of "next_update".
2021-02-19 19:56:40 +01:00
Patric Stout
d437445c67
Codechange: use std::chrono to track time in modal windows
...
Adding to _realtime_ticks in a random place is a bit of a hack,
and by using modern C++, we can avoid this hack.
2021-02-19 10:43:15 +01:00
frosch
c71d0f5e7f
Change: move townname generator selection to mapgen GUI.
2021-02-14 23:14:07 +01:00
frosch
d17226910d
Codechange: minor rearrangement of settings in random map and heightmap GUI.
2021-02-14 23:14:07 +01:00
frosch
81e47277e7
Change: move the 'tree placer algorithm' selection to the settings tree window, and give it the same 'basic' visibility as 'in-game tree placement'.
2021-02-14 23:14:07 +01:00
Charles Pigott
9b800a96ed
Codechange: Remove min/max functions in favour of STL variants ( #8502 )
2021-01-08 11:16:18 +01:00
Michael Lutz
65f65ad2ad
Codechange: Convert some more FIO functions to take std::string.
2020-12-27 13:19:25 +01:00
Charles Pigott
860c270c73
Codechange: Replace assert_compile macro with static_assert
2020-12-27 10:55:42 +00:00
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
2019-11-10 17:59:20 +00:00
Henry Wilson
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
2019-04-10 23:22:20 +02:00
Michael Lutz
c7b9987d08
Codechange: Switch DropDownList to directly use std::vector, thus making AutoDeleteSmallVector obsolete.
...
DropDownListItem are strongly managed using std::unique_ptr to ensure leak-free handling. Appropriate use
of move-semantics make intent a lot clearer than parameter comments and allows the compiler to generate
copy-free code for most situations.
2019-04-09 22:45:15 +02:00
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.
2019-04-06 11:27:39 +02:00
Henry Wilson
a0f36a50e6
Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back()
2019-03-26 20:15:57 +00:00
peter1138
317f69c152
Codechange: Use override specifier in Window-derived classes.
2019-03-24 16:10:04 +01:00
Miguel Horta
e00908f5e9
Fix #6898 : Replace atoi() with strtoul()
...
Normalize type and parsing of generation_seed across all files
Add assert_compile() to ensure correct type
2018-10-11 20:22:31 +01:00
Niels Martin Hansen
836d25e738
Codechange: Address some MSVC compiler warnings
2018-06-15 22:36:55 +02:00
alberth
597380e099
(svn r27650) -Codechange: Replace SaveOrLoadMode by FileOperation and DetailedFileType.
2016-09-04 12:57:43 +00:00
alberth
9135f7130e
(svn r27635) -Codechange: Move FileType and FileToSaveLoad structure definitions.
2016-09-04 12:45:40 +00:00
frosch
4d1843a95e
(svn r27627) -Codechange: Deduplicate some cursor magic into SetMouseCursorBusy.
2016-08-15 18:32:48 +00:00
alberth
b8414c2884
(svn r27285) -Codechange: Use LG_ORIGINAL instead of a magic 0 to indicate the original landscape generator.
2015-05-16 12:01:19 +00:00
alberth
4b2db6e649
(svn r27140) -Codechange: Fix typo in GenenerateLandscapeWindowMode (chillcore)
2015-02-08 21:05:48 +00:00
frosch
1c181fd460
(svn r27135) -Fix: Misalignment in generate world window in case of small fonts.
2015-02-01 22:04:50 +00:00
alberth
78896895cf
(svn r27085) -Fix: Always return a valid window to the world generation gui code.
2014-12-18 18:20:59 +00:00
rubidium
dfd57f2616
(svn r27043) -Fix: could not enter third digit of snow line height
2014-10-25 21:02:59 +00:00
rubidium
8d90e86c2c
(svn r27009) -Add: extra level of general map heightness (ChillCore)
2014-10-13 14:22:48 +00:00
rubidium
550cd50382
(svn r26926) -Change: limit flat world height to the maximum configured map height
2014-09-27 09:53:48 +00:00
rubidium
ed0ee3ffb3
(svn r26911) -Change: increase maximum possible flat land height in scenario editor to be entered directly (ic111)
2014-09-22 19:21:37 +00:00
rubidium
f56b8ba69e
(svn r26890) -Cleanup: remove unneeded obfuscation via IConsoleSetSetting
2014-09-21 14:45:35 +00:00
rubidium
c72d362840
(svn r26885) -Feature-ish: user interface for limiting the maximum height of a map
2014-09-21 12:25:04 +00:00
peter1138
c4311903b7
(svn r26862) -Codechange: Don't shrink widget size in new game window.
2014-09-20 12:27:09 +00:00
frosch
775c96a0d2
(svn r26526) -Remove: Ability to set map generation seed via GUI. If you really need it, use the console.
2014-04-27 15:15:28 +00:00
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
2014-04-23 20:13:33 +00:00
rubidium
83eeba28b7
(svn r26086) -Codechange: use AutoDeleteSmallVector instead std::list for dropdowns
2013-11-24 14:46:26 +00:00
frosch
8157a8afd8
(svn r25290) -Add: Assign string names to notable windows.
2013-05-26 19:25:01 +00:00
frosch
56e4a8c4d6
(svn r25287) -Codechange: Keep a reference to the WindowDesc in the Window after construction.
2013-05-26 19:23:42 +00:00
frosch
579ee7a592
(svn r25089) -Codechange: Move CharSetFilter from QueryString to Textbuf.
2013-03-17 13:04:10 +00:00
frosch
9b7c8cf7a7
(svn r24925) -Fix [FS#5395]: Add a tooltip to the mapsize selection mentioning possible deviations.
2013-01-20 14:51:50 +00:00
frosch
3ce8d2ce70
(svn r24846) -Add: Advanced settings to disable certain sound effects.
2012-12-23 21:09:09 +00:00
frosch
b533523258
(svn r24801) -Codechange: Add functions to set integral DParams to suitable values for size computations.
2012-12-08 17:18:51 +00:00
frosch
545b6de900
(svn r24747) -Fix: Some editboxes had a different colour than the rest of the window.
2012-11-14 22:50:53 +00:00
frosch
f5d8ba5d7f
(svn r24742) -Codechange: Remove QueryStringBaseWindow and store QueryStrings per widget instead.
2012-11-14 22:50:35 +00:00
frosch
6e6d94a2d1
(svn r24740) -Codechange: Remove duplicate members from QueryStringBaseWindow and directly use QueryString.
2012-11-14 22:50:26 +00:00
frosch
6653ac6b36
(svn r24739) -Codechange: Simplify some code by using Textbuf::Assign.
2012-11-14 22:50:21 +00:00
frosch
f6d4200f86
(svn r24738) -Codechange: Remove Textbuf::Initialize in favour of a constructor.
2012-11-14 22:50:17 +00:00
frosch
2c22fe98dd
(svn r24734) -Codechange: Move QueryStringBaseWindow::OnOSKInput to Window::OnEditboxChanged.
2012-11-13 21:47:07 +00:00
frosch
c4d7c8dd42
(svn r24733) -Codechange: Move handling of editbox keys to window class.
2012-11-13 21:47:02 +00:00
frosch
6d1fe626f5
(svn r24729) -Codechange: Unify the handling of HEBR_EDITING.
2012-11-13 21:46:46 +00:00
frosch
1071d51508
(svn r24727) -Fix: In various windows the OSK looked shiny but using it had no effect whatsoever.
2012-11-13 21:46:37 +00:00
frosch
137adb3496
(svn r24726) -Codechange: Move editbox mouseloop handling to Window class.
2012-11-13 21:46:33 +00:00
frosch
17025fa6ea
(svn r24724) -Codechange: Move drawing of editboxes to the widget drawing code.
2012-11-13 21:46:19 +00:00
frosch
03736af2ae
(svn r24700) -Cleanup: Remove WDF_UNCLICK_BUTTONS and make it the default.
2012-11-11 16:10:43 +00:00
frosch
cd55253865
(svn r24699) -Codechange: Proper usage of push and toggle buttons in mapgen and script debug GUI.
2012-11-11 16:10:11 +00:00
frosch
2e368bfb9f
(svn r24698) -Codechange: Use PUSH-buttons when buttons can be pushed.
2012-11-11 16:09:08 +00:00
frosch
d58eee1e79
(svn r24324) -Codechange: Turn functions dealing with Textbufs into member functions.
2012-06-04 15:30:29 +00:00
rubidium
6d6be50ae0
(svn r23740) -Codechange: remove some 300 unneeded includes from the .cpp files
2012-01-03 21:32:51 +00:00
truebrain
83f2785f54
(svn r23611) -Add: run the begin of the script already while generating, and don't sleep on DoCommand while doing so
2011-12-19 20:56:50 +00:00
frosch
4e4a87bd3c
(svn r23579) -Fix (r23525): Most up/down arrows stopped working.
2011-12-17 20:52:07 +00:00
truebrain
e9f584ac21
(svn r23531) -Codechange: document and rename widgets to be consistent and understandable
2011-12-16 16:27:45 +00:00
truebrain
2aa774e831
(svn r23528) -Codechange: move widget enums to widgets/NNN_type.h
2011-12-15 22:22:55 +00:00
truebrain
df0afdf0dc
(svn r23525) -Codechange: make Window::flags4 WindowFlags instead of uint16, with only values known in WindowFlags (and move out 2 timers to their own variable)
...
-Codechange: rename Window::flags4 to Window::flags
-Codechange: move some non-inline functions from .hpp to .cpp
2011-12-15 19:54:23 +00:00
rubidium
420d358fef
(svn r23475) -Codechange: queue critical error messages, so when multiple happen you won't miss any
2011-12-10 15:14:11 +00:00
rubidium
b231e80125
(svn r23470) -Codechange: move declaration of SwitchToMode to a header instead of declaring it in 6 other files
2011-12-10 08:31:14 +00:00
frosch
81732114f0
(svn r22902) -Fix: The name of the heightmap glitches in the 'play heightmap' window.
2011-09-06 20:33:56 +00:00
frosch
d0a4672cc4
(svn r22901) -Fix (r22767): The river density dropdown was missing in the 'play heightmap' window.
2011-09-06 18:32:48 +00:00
rubidium
38ad276acc
(svn r22819) -Fix: include the header where it should be included
2011-08-24 12:12:36 +00:00
rubidium
e99aec39ef
(svn r22789) -Codechange: rename generation window class to modal progress
2011-08-21 12:49:14 +00:00
rubidium
421053a694
(svn r22788) -Codechange: move modal progress related functions and variables to progress.cpp/h
2011-08-21 12:48:46 +00:00
rubidium
a67cf6bae1
(svn r22787) -Codechange: rename genworld redraw constant
2011-08-21 12:47:45 +00:00
rubidium
7b7869fba7
(svn r22786) -Codechange: rename genworld mutices to model_progress mutices
2011-08-21 12:47:24 +00:00
rubidium
37415b9cf7
(svn r22785) -Codechange: rename IsGeneratingWorld to HasModalProgress
2011-08-21 12:46:46 +00:00
rubidium
e17d799cb3
(svn r22769) -Fix (r22678): failed patch merging
2011-08-20 14:23:14 +00:00
rubidium
11a4e402c6
(svn r22768) -Add: progress bar updates for river building
2011-08-20 14:15:40 +00:00
rubidium
0041408e4f
(svn r22767) -Add: river generation
2011-08-20 14:14:17 +00:00
alberth
a0cd04130a
(svn r22608) -Fix[FS#4663]: Use rotated heightmap sizes for reporting scaling problems.
2011-06-26 16:16:04 +00:00
rubidium
fb5ecb9499
(svn r22411) -Document: another bunch of bits
2011-05-02 17:42:12 +00:00
terkhen
5bb7a48cd2
(svn r22345) -Change: Remove pixel limiter for text buffers.
2011-04-17 18:44:09 +00:00
terkhen
10caf391a1
(svn r22343) -Change: Remove pixel limiter for query strings.
2011-04-17 18:42:17 +00:00
frosch
93272478b7
(svn r22259) -Fix (r9779)[FS#4557]: Remove duplicate and wrong (too early) activation of new game settings. (chillcore)
2011-03-18 19:36:20 +00:00
frosch
ec9540a12a
(svn r22241) -Codechange: Add additional to-be-used parameter to OnInvalidateData().
2011-03-13 21:31:29 +00:00
alberth
5f505a69f3
(svn r22211) -Codechange: Unduplicate Off/On strings.
2011-03-06 15:52:23 +00:00
alberth
4364cec392
(svn r22001) -Codechange: Rename difficulty.number_industries to difficulty.industry_density.
2011-02-06 18:26:50 +00:00
alberth
d84502c432
(svn r22000) -Codechange: Introduce an enum for the industry density setting.
2011-02-06 18:11:39 +00:00
alberth
7935eab3dc
(svn r21972) -Fix: Replace 'None' industries in the generation window with more descriptive label.
2011-02-05 11:42:27 +00:00
alberth
bdf5a1c2f7
(svn r21969) -Feature: Introduce 'minimal' number of industries as a replacment for the old 'none' setting in the newgame window.
2011-02-05 10:28:31 +00:00
rubidium
7eba2bf4d3
(svn r21890) -Cleanup: remove some unneeded includes
2011-01-22 14:52:20 +00:00
terkhen
679cd3c21b
(svn r21803) -Cleanup: Remove unnecessary semicolons.
2011-01-15 15:36:58 +00:00
alberth
f5c6fd1a25
(svn r21331) -Codechange: Make drawing the widgets default behaviour in OnPaint().
2010-11-26 15:22:18 +00:00
terkhen
725cf7d8bb
(svn r21080) -Fix: Do not allow to use a custom water level with the original map generator.
2010-11-04 18:34:37 +00:00
terkhen
0568976c78
(svn r21034) -Fix: Add missing default values for the custom town number and custom water level world generation options.
2010-10-24 20:58:31 +00:00
terkhen
e90930e572
(svn r20832) -Feature: Allow to select a custom percentage of water in the map generation window (based on patch by CommanderZ).
2010-09-20 18:56:35 +00:00