40#include "table/strings.h"
47extern void MakeNewgameSettingsLive();
180 NWidget(
WWT_TEXT, INVALID_COLOUR),
SetStringTip(STR_MAPGEN_NORTHWEST),
SetPadding(0,
WidgetDimensions::unscaled.hsep_normal, 0, 0),
SetFill(1, 1),
SetAlignment(
SA_RIGHT |
SA_VERT_CENTER),
186 NWidget(
WWT_TEXT, INVALID_COLOUR),
SetStringTip(STR_MAPGEN_SOUTHWEST),
SetPadding(0,
WidgetDimensions::unscaled.hsep_normal, 0, 0),
SetFill(1, 1),
SetAlignment(
SA_RIGHT |
SA_VERT_CENTER),
333 MakeNewgameSettingsLive();
341 default: NOT_REACHED();
345static void LandscapeGenerationCallback(
Window *w,
bool confirmed)
355 list.push_back(MakeDropDownListStringItem(
GetString(STR_JUST_INT, 1ULL << i), i));
366 const auto &grf_names = GetGRFTownNameList();
367 for (uint i = 0; i < grf_names.size(); i++) {
372 size_t newgrf_size = list.size();
374 if (newgrf_size > 0) {
375 list.push_back(MakeDropDownListDividerItem());
381 list.push_back(MakeDropDownListStringItem(STR_MAPGEN_TOWN_NAME_ORIGINAL_ENGLISH + i, i));
389static const StringID _max_height[] = {STR_TERRAIN_TYPE_VERY_FLAT, STR_TERRAIN_TYPE_FLAT, STR_TERRAIN_TYPE_HILLY, STR_TERRAIN_TYPE_MOUNTAINOUS, STR_TERRAIN_TYPE_ALPINIST, STR_TERRAIN_TYPE_CUSTOM};
390static const StringID _sea_lakes[] = {STR_SEA_LEVEL_VERY_LOW, STR_SEA_LEVEL_LOW, STR_SEA_LEVEL_MEDIUM, STR_SEA_LEVEL_HIGH, STR_SEA_LEVEL_CUSTOM};
391static const StringID _rivers[] = {STR_RIVERS_NONE, STR_RIVERS_FEW, STR_RIVERS_MODERATE, STR_RIVERS_LOT};
392static const StringID _borders[] = {STR_MAPGEN_BORDER_RANDOMIZE, STR_MAPGEN_BORDER_MANUAL, STR_MAPGEN_BORDER_INFINITE_WATER};
393static const StringID _smoothness[] = {STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN_VERY_SMOOTH, STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN_SMOOTH, STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN_ROUGH, STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN_VERY_ROUGH};
394static const StringID _rotation[] = {STR_CONFIG_SETTING_HEIGHTMAP_ROTATION_COUNTER_CLOCKWISE, STR_CONFIG_SETTING_HEIGHTMAP_ROTATION_CLOCKWISE};
395static const StringID _num_towns[] = {STR_NUM_VERY_LOW, STR_NUM_LOW, STR_NUM_NORMAL, STR_NUM_HIGH, STR_NUM_CUSTOM};
396static const StringID _num_inds[] = {STR_FUNDING_ONLY, STR_MINIMAL, STR_NUM_VERY_LOW, STR_NUM_LOW, STR_NUM_NORMAL, STR_NUM_HIGH, STR_NUM_CUSTOM};
397static const StringID _variety[] = {STR_VARIETY_NONE, STR_VARIETY_VERY_LOW, STR_VARIETY_LOW, STR_VARIETY_MEDIUM, STR_VARIETY_HIGH, STR_VARIETY_VERY_HIGH};
398static const StringID _average_height[] = {STR_CONFIG_SETTING_AVERAGE_HEIGHT_AUTO, STR_CONFIG_SETTING_AVERAGE_HEIGHT_LOWLANDS, STR_CONFIG_SETTING_AVERAGE_HEIGHT_NORMAL, STR_CONFIG_SETTING_AVERAGE_HEIGHT_PLATEAUS};
402struct GenerateLandscapeWindow :
public Window {
445 if (_game_mode == GM_EDITOR) {
446 return GetString(STR_CONFIG_SETTING_OFF);
456 STR_MAPGEN_TOWN_NAME_ORIGINAL_ENGLISH + gen :
462 if (_game_mode == GM_EDITOR) {
463 return GetString(STR_CONFIG_SETTING_OFF);
496 return GetString(STR_MAPGEN_HEIGHTMAP_SIZE, this->y, this->x);
498 return GetString(STR_MAPGEN_HEIGHTMAP_SIZE, this->x, this->y);
510 void OnInvalidateData([[maybe_unused]]
int data = 0, [[maybe_unused]]
bool gui_scope =
true)
override
512 if (!gui_scope)
return;
542 int climate_plane = 0;
579 std::span<const StringID> strs;
653 d.width += padding.width;
654 d.height += padding.height;
709 LandscapeGenerationCallback);
711 StartGeneratingLandscape(mode);
798 uint32_t hidden_mask = 0;
890 this->widget_id = widget;
905 this->widget_id = widget;
913 this->widget_id = widget;
922 case BorderFlagPresets::Random:
926 case BorderFlagPresets::Manual:
930 case BorderFlagPresets::InfiniteWater:
941 this->widget_id = widget;
954 if (!str.has_value())
return;
959 if (!val.has_value())
return;
963 switch (this->widget_id) {
972 default: NOT_REACHED();
976 switch (this->widget_id) {
1161 d.width += padding.width;
1162 d.height += padding.height;
1245 if (!str.has_value())
return;
1248 if (!value.has_value())
return;
1250 switch (this->widget_id) {
1266static constexpr std::initializer_list<NWidgetPart> _nested_create_scenario_widgets = {
1329 _nested_create_scenario_widgets
1339static constexpr std::initializer_list<NWidgetPart> _nested_generate_progress_widgets = {
1355 _nested_generate_progress_widgets
1359 static inline uint percent;
1361 static inline uint current;
1362 static inline uint total;
1365static const StringID _generation_class_table[] = {
1366 STR_GENERATION_WORLD_GENERATION,
1367 STR_GENERATION_LANDSCAPE_GENERATION,
1368 STR_GENERATION_RIVER_GENERATION,
1369 STR_GENERATION_CLEARING_TILES,
1370 STR_GENERATION_TOWN_GENERATION,
1371 STR_GENERATION_LAND_INDUSTRY_GENERATION,
1372 STR_GENERATION_WATER_INDUSTRY_GENERATION,
1373 STR_GENERATION_OBJECT_GENERATION,
1374 STR_GENERATION_TREE_GENERATION,
1375 STR_GENERATION_SETTINGUP_GAME,
1376 STR_GENERATION_PREPARING_TILELOOP,
1377 STR_GENERATION_PREPARING_SCRIPT,
1378 STR_GENERATION_PREPARING_GAME
1380static_assert(
lengthof(_generation_class_table) == GWP_CLASS_COUNT);
1383static void AbortGeneratingWorldCallback(
Window *,
bool confirmed)
1392struct GenerateProgressWindow :
public Window {
1394 GenerateProgressWindow() :
Window(_generate_progress_desc)
1408 AbortGeneratingWorldCallback
1426 for (uint i = 0; i < GWP_CLASS_COUNT; i++) {
1452 GetString(STR_GENERATION_PROGRESS_NUM, GenWorldStatus::current, GenWorldStatus::total), TC_FROMSTRING,
SA_HOR_CENTER);
1462 GenWorldStatus::cls = STR_GENERATION_WORLD_GENERATION;
1463 GenWorldStatus::current = 0;
1464 GenWorldStatus::total = 0;
1465 GenWorldStatus::percent = 0;
1477static void _SetGeneratingWorldProgress(
GenWorldProgress cls, uint progress, uint total)
1479 static const int percent_table[] = {0, 5, 14, 17, 20, 40, 55, 60, 65, 80, 85, 95, 99, 100 };
1480 static_assert(
lengthof(percent_table) == GWP_CLASS_COUNT + 1);
1481 assert(cls < GWP_CLASS_COUNT);
1495 assert(GenWorldStatus::cls == _generation_class_table[cls]);
1496 GenWorldStatus::current += progress;
1497 assert(GenWorldStatus::current <= GenWorldStatus::total);
1499 GenWorldStatus::cls = _generation_class_table[cls];
1500 GenWorldStatus::current = progress;
1501 GenWorldStatus::total = total;
1502 GenWorldStatus::percent = percent_table[cls];
1506 GenWorldStatus::percent = percent_table[cls] + (percent_table[cls + 1] - percent_table[cls]) * (GenWorldStatus::current == 0 ? 0 : GenWorldStatus::current - 1) / GenWorldStatus::total;
1509 static uint last_percent = 0;
1512 if (GenWorldStatus::percent == 0)
return;
1514 if (GenWorldStatus::percent < last_percent) last_percent = 0;
1516 if (GenWorldStatus::percent % 5 != 0 && GenWorldStatus::percent <= last_percent + 5)
return;
1518 if (GenWorldStatus::percent <= last_percent + 2)
return;
1520 Debug(net, 3,
"Map generation percentage complete: {}", GenWorldStatus::percent);
1521 last_percent = GenWorldStatus::percent;
1541 if (total == 0)
return;
1543 _SetGeneratingWorldProgress(cls, 0, total);
1556 _SetGeneratingWorldProgress(cls, 1, 0);
void ShowAIConfigWindow()
Open the AI config window.
Window for configuring the AIs.
constexpr T SetBit(T &x, const uint8_t y)
Set a bit in a variable.
static bool NatSortFunc(std::unique_ptr< const DropDownListItem > const &first, std::unique_ptr< const DropDownListItem > const &second)
Container for an encoded string, created by GetEncodedString.
std::string GetDecodedString() const
Decode the encoded string.
static Date ConvertYMDToDate(Year year, Month month, Day day)
Converts a tuple of Year, Month and Day to a Date.
static constexpr TimerGame< struct Calendar >::Year DEF_START_YEAR
static constexpr TimerGame< struct Calendar >::Year MIN_YEAR
static constexpr TimerGame< struct Calendar >::Year MAX_YEAR
static VideoDriver * GetInstance()
Get the currently active instance of the video driver.
void GameLoopPause()
Pause the game-loop for a bit, releasing the game-state lock.
Functions related to debugging.
#define Debug(category, level, format_string,...)
Output a line of debugging information.
void ShowDropDownMenu(Window *w, std::span< const StringID > strings, int selected, WidgetID button, uint32_t disabled_mask, uint32_t hidden_mask, uint width)
Show a dropdown menu window near a widget of the parent window.
void ShowDropDownList(Window *w, DropDownList &&list, int selected, WidgetID button, uint width, DropDownOptions options)
Show a drop down list.
Common drop down list components.
Functions related to the drop down widget.
Types related to the drop down widget.
std::vector< std::unique_ptr< const DropDownListItem > > DropDownList
A drop down list is a collection of drop down list items.
constexpr std::underlying_type_t< enum_type > to_underlying(enum_type e)
Implementation of std::to_underlying (from C++23).
Functions related to errors.
void ClearErrorMessages()
Clear all errors from the queue.
Declarations for savegames operations.
int GetCharacterHeight(FontSize size)
Get height of a character for a given font size.
void ShowGSConfigWindow()
Open the GS config window.
Window for configuring GS.
void HandleGeneratingWorldAbortion()
Really handle the abortion, i.e.
void AbortGeneratingWorld()
Initializes the abortion process.
bool IsGeneratingWorldAborted()
Is the generation being aborted?
Functions related to world/map generation.
static const uint MAP_HEIGHT_LIMIT_AUTO_MINIMUM
When map height limit is auto, make this the lowest possible map height limit.
@ LG_ORIGINAL
The original landscape generator.
static const uint CUSTOM_SEA_LEVEL_MAX_PERCENTAGE
Maximum percentage a user can specify for custom sea level.
static const uint CUSTOM_SEA_LEVEL_NUMBER_DIFFICULTY
Value for custom sea level in difficulty settings.
GenWorldProgress
Current stage of world generation process.
static const uint CUSTOM_SEA_LEVEL_MIN_PERCENTAGE
Minimum percentage a user can specify for custom sea level.
static constexpr std::initializer_list< NWidgetPart > _nested_generate_landscape_widgets
Widgets of GenerateLandscapeWindow when generating world.
void IncreaseGeneratingWorldProgress(GenWorldProgress cls)
Increases the current stage of the world generation with one.
void ShowGenerateWorldProgress()
Show the window where a user can follow the process of the map generation.
void ShowGenerateLandscape()
Start with a normal game.
void ShowCreateScenario()
Show the window to create a scenario.
static constexpr std::initializer_list< NWidgetPart > _nested_heightmap_load_widgets
Widgets of GenerateLandscapeWindow when loading heightmap.
static uint GetMapHeightLimit()
Get the map height limit, or if set to "auto", the absolute limit.
void SetNewLandscapeType(LandscapeType landscape)
Changes landscape type and sets genworld window dirty.
void StartScenarioEditor()
Start with a scenario editor.
void SetGeneratingWorldProgress(GenWorldProgress cls, uint total)
Set the total of a stage of the world generation.
void PrepareGenerateWorldProgress()
Initializes the progress counters to the starting point.
GenerateLandscapeWindowMode
Enum for the modes we can generate in.
@ GLWM_GENERATE
Generate new game.
@ GLWM_HEIGHTMAP
Load from heightmap.
@ GLWM_SCENARIO
Generate flat land.
void ShowHeightmapLoad()
Start with loading a heightmap.
void StartNewGameWithoutGUI(uint32_t seed)
Start a normal game without the GUI.
Dimension maxdim(const Dimension &d1, const Dimension &d2)
Compute bounding box of both dimensions.
void SetMouseCursor(CursorID sprite, PaletteID pal)
Assign a single non-animated sprite to the cursor.
Dimension GetStringBoundingBox(std::string_view str, FontSize start_fontsize)
Return the string dimension in pixels.
Dimension GetStringListBoundingBox(std::span< const StringID > list, FontSize fontsize)
Get maximum dimension of a list of strings.
int DrawString(int left, int right, int top, std::string_view str, TextColour colour, StringAlignment align, bool underline, FontSize fontsize)
Draw string, possibly truncated to make it fit in its allocated space.
bool _left_button_clicked
Is left mouse button clicked?
void SetMouseCursorBusy(bool busy)
Set or unset the ZZZ cursor.
SwitchMode _switch_mode
The next mainloop command.
@ FS_NORMAL
Index of the normal font in the font tables.
@ SA_RIGHT
Right align the text (must be a single bit).
@ SA_HOR_CENTER
Horizontally center the text.
@ SA_CENTER
Center both horizontally and vertically.
@ SA_VERT_CENTER
Vertically center the text.
void SetDirty() const
Mark entire window as dirty (in need of re-paint).
bool GetHeightmapDimensions(DetailedFileType dft, std::string_view filename, uint *x, uint *y)
Get the dimensions of a heightmap.
Functions related to creating heightmaps from files.
@ HM_CLOCKWISE
Rotate the map clockwise 45 degrees.
static constexpr BorderFlags BORDERFLAGS_ALL
Border on all sides.
LandscapeType
Landscape types.
@ Arctic
Landscape with snow levels.
@ Toyland
Landscape with funky industries and vehicles.
@ Tropic
Landscape with distinct rainforests and deserts,.
@ Temperate
Base landscape.
@ NorthWest
Border on North West.
@ Random
Randomise borders.
@ NorthEast
Border on North East.
@ SouthEast
Border on South East.
@ SouthWest
Border on South West.
#define Point
Macro that prevents name conflicts between included headers.
static const uint MIN_MAP_SIZE_BITS
Minimal and maximal map width and height.
static const uint MAX_MAP_SIZE
Maximal map size = 4096.
static const uint MAX_MAP_SIZE_BITS
Maximal size of map is equal to 2 ^ MAX_MAP_SIZE_BITS.
constexpr T Clamp(const T a, const T min, const T max)
Clamp a value between an interval.
void ShowQuery(EncodedString &&caption, EncodedString &&message, Window *parent, QueryCallbackProc *callback, bool focus)
Show a confirmation window with standard 'yes' and 'no' buttons The window is aligned to the centre o...
void ShowQueryString(std::string_view str, StringID caption, uint maxsize, Window *parent, CharSetFilter afilter, QueryStringFlags flags)
Show a query popup window with a textbox in it.
bool _network_dedicated
are we a dedicated server?
Basic functions/variables used all over the place.
void ResetGRFConfig(bool defaults)
Reset the current GRF Config to either blank or newgame settings.
GRFConfigList _grfconfig_newgame
First item in list of default GRF set up.
void ShowNewGRFSettings(bool editable, bool show_params, bool exec_changes, GRFConfigList &config)
Setup the NewGRF gui.
Header of Action 0F "universal holder" structure and functions.
@ SM_START_HEIGHTMAP
Load a heightmap and start a new game from it.
@ SM_GENRANDLAND
Generate random land within scenario editor.
@ SM_LOAD_HEIGHTMAP
Load heightmap from scenario editor.
@ SM_EDITOR
Switch to scenario editor.
@ SM_NEWGAME
New Game --> 'Random game'.
Functions related to modal progress.
bool HasModalProgress()
Check if we are currently in a modal progress state.
Base for the GUIs that have an edit box in them.
Pseudo random number generator.
A number of safeguards to prevent using unsafe methods.
FileToSaveLoad _file_to_saveload
File to save or load in the openttd loop.
Functions/types related to saving and loading games.
GameSettings _settings_newgame
Game settings for new games (updated from the intro screen).
IndustryDensity
Available industry map generation densities.
@ End
Number of industry density settings.
@ Custom
Custom number of industries.
BorderFlagPresets
Possible options for the Borders pulldown in the Genworld GUI.
GenworldAverageHeight
Possible options for the Average Height pulldown in the Genworld GUI.
GenworldMaxHeight
Possible options for the Maximum Height pulldown in the Genworld GUI.
void SndConfirmBeep()
Play a beep sound for a confirm event if enabled in settings.
void SndClickBeep()
Play a beep sound for a click event if enabled in settings.
Functions related to sound.
Definition of base types and functions in a cross-platform compatible way.
#define lengthof(array)
Return the length of an fixed size array.
static std::optional< T > ParseInteger(std::string_view arg, int base=10, bool clamp=false)
Change a string into its number representation.
Functions related to low-level strings.
@ CS_NUMERAL
Only numeric ones.
uint64_t GetParamMaxValue(uint64_t max_value, uint min_count, FontSize size)
Get some number that is suitable for string size computations.
EncodedString GetEncodedString(StringID str)
Encode a string with no parameters into an encoded string.
std::string GetString(StringID string)
Resolve the given StringID into a std::string with formatting but no parameters.
TextDirection _current_text_dir
Text direction of the currently selected language.
Functions related to OTTD's strings.
uint32_t StringID
Numeric value that represents a string, independent of the selected language.
static constexpr uint32_t BUILTIN_TOWNNAME_GENERATOR_COUNT
The number of builtin generators for town names.
@ TD_RTL
Text is written right-to-left by default.
std::string GetWidgetString(WidgetID widget, StringID stringid) const override
Get the raw string for a widget.
void OnDropdownSelect(WidgetID widget, int index, int) override
A dropdown option associated to this window has been selected.
void OnClick(Point pt, WidgetID widget, int click_count) override
A click with the left mouse button has been made on the window.
void OnQueryTextFinished(std::optional< std::string > str) override
The query window opened from this window has closed.
void UpdateWidgetSize(WidgetID widget, Dimension &size, const Dimension &padding, Dimension &fill, Dimension &resize) override
Update size and resize step of a widget in the window.
void OnPaint() override
The window must be repainted.
void OnTimeout() override
Called when this window's timeout has been reached.
Dimensions (a width and height) of a rectangle in 2D.
void UpdateWidgetSize(WidgetID widget, Dimension &size, const Dimension &padding, Dimension &fill, Dimension &resize) override
Update size and resize step of a widget in the window.
void OnDropdownSelect(WidgetID widget, int index, int) override
A dropdown option associated to this window has been selected.
void OnTimeout() override
Called when this window's timeout has been reached.
void OnInvalidateData(int data=0, bool gui_scope=true) override
Some data on this window has become invalid.
void OnClick(Point pt, WidgetID widget, int click_count) override
A click with the left mouse button has been made on the window.
std::string GetWidgetString(WidgetID widget, StringID stringid) const override
Get the raw string for a widget.
void OnQueryTextFinished(std::optional< std::string > str) override
The query window opened from this window has closed.
void OnClick(Point pt, WidgetID widget, int click_count) override
A click with the left mouse button has been made on the window.
void UpdateWidgetSize(WidgetID widget, Dimension &size, const Dimension &padding, Dimension &fill, Dimension &resize) override
Update size and resize step of a widget in the window.
void DrawWidget(const Rect &r, WidgetID widget) const override
Draw the contents of a nested widget.
static size_t GetNumItems()
static constexpr size_t MAX_SIZE
Specification of a rectangle with absolute coordinates of all edges.
Rect Shrink(int s) const
Copy and shrink Rect by s pixels.
High level window description.
Number to differentiate different windows of the same class.
Data structure for an opened window.
void DrawWidgets() const
Paint all widgets of a window.
void InvalidateData(int data=0, bool gui_scope=true)
Mark this window's data as invalid (in need of re-computing).
void RaiseWidget(WidgetID widget_index)
Marks a widget as raised.
void SetWidgetDirty(WidgetID widget_index) const
Invalidate a widget, i.e.
virtual std::string GetWidgetString(WidgetID widget, StringID stringid) const
Get the raw string for a widget.
ResizeInfo resize
Resize information.
void SetWidgetsDisabledState(bool disab_stat, Args... widgets)
Sets the enabled/disabled status of a list of widgets.
void SetWidgetLoweredState(WidgetID widget_index, bool lowered_stat)
Sets the lowered/raised status of a widget.
void RaiseWidgetsWhenLowered(Args... widgets)
Raises the widgets and sets widgets dirty that are lowered.
Window(WindowDesc &desc)
Empty constructor, initialization has been moved to InitNested() called from the constructor of the d...
const NWID * GetWidget(WidgetID widnum) const
Get the nested widget with number widnum from the nested widget tree.
void LowerWidget(WidgetID widget_index)
Marks a widget as lowered.
void HandleButtonClick(WidgetID widget)
Do all things to make a button look clicked and mark it to be unclicked in a few ticks.
void InitNested(WindowNumber number=0)
Perform complete initialization of the Window with nested widgets, to allow use.
WindowFlags flags
Window flags.
void SetWidgetDisabledState(WidgetID widget_index, bool disab_stat)
Sets the enabled/disabled status of a widget.
int width
width of the window (number of pixels to the right in x direction)
WindowNumber window_number
Window number within the window class.
@ EnableDefault
enable the 'Default' button ("\0" is returned)
static constexpr uint MAX_TILE_HEIGHT
Maximum allowed tile height.
static constexpr uint MIN_CUSTOM_TERRAIN_TYPE
Lowest possible peak value for world generation.
static constexpr uint DEF_DESERT_COVERAGE
Default desert coverage.
static constexpr uint MIN_MAP_HEIGHT_LIMIT
Lower bound of maximum allowed heightlevel (in the construction settings).
static constexpr uint MAX_MAP_HEIGHT_LIMIT
Upper bound of maximum allowed heightlevel (in the construction settings).
static constexpr uint MIN_HEIGHTMAP_HEIGHT
Lowest possible peak value for heightmap creation.
static constexpr uint DEF_SNOW_COVERAGE
Default snow coverage.
Definition of the game-calendar-timer.
static const uint CUSTOM_TOWN_MAX_NUMBER
this is the maximum number of towns a user can specify in customisation
static const uint CUSTOM_TOWN_NUMBER_DIFFICULTY
value for custom town number in difficulty settings
Definition of structures used for generating town names.
Base of all video drivers.
void CloseWindowByClass(WindowClass cls, int data)
Close all windows of a given class.
Window * BringWindowToFrontById(WindowClass cls, WindowNumber number)
Find a window and make it the relative top-window on the screen.
void CloseAllNonVitalWindows()
It is possible that a stickied window gets to a position where the 'close' button is outside the gami...
void SetWindowDirty(WindowClass cls, WindowNumber number)
Mark window as dirty (in need of repainting).
void InvalidateWindowClassesData(WindowClass cls, int data, bool gui_scope)
Mark window data of all windows of a given class as invalid (in need of re-computing) Note that by de...
Window functions not directly related to making/drawing windows.
@ NoClose
This window can't be interactively closed.
@ BorderOnly
Draw border only, no background.
@ Lowered
If set the frame is lowered and the background colour brighter (ie. buttons when pressed).
Twindow * AllocateWindowDescFront(WindowDesc &desc, WindowNumber window_number, Targs... extra_arguments)
Open a new window.
@ Timeout
Window timeout counter.
@ WDP_CENTER
Center the window.
@ WN_GAME_OPTIONS_GAME_OPTIONS
Game options.
@ WC_SELECT_GAME
Select game window; Window numbers:
@ WC_NONE
No window, redirects to WC_MAIN_WINDOW.
@ WC_GENERATE_LANDSCAPE
Generate landscape (newgame); Window numbers:
@ WC_GAME_OPTIONS
Game options window; Window numbers:
@ WC_MODAL_PROGRESS
Progress report of landscape generation; Window numbers: