Merge branch 'master' into jgrpp

# Conflicts:
#	.github/workflows/release-windows.yml
#	src/company_base.h
#	src/company_cmd.cpp
#	src/company_gui.cpp
#	src/console_cmds.cpp
#	src/economy.cpp
#	src/economy_cmd.h
#	src/fios.h
#	src/goal.cpp
#	src/group_gui.cpp
#	src/network/core/config.h
#	src/network/network_admin.cpp
#	src/newgrf_config.cpp
#	src/os/windows/win32.cpp
#	src/saveload/afterload.cpp
#	src/saveload/company_sl.cpp
#	src/saveload/saveload.cpp
#	src/saveload/saveload_error.hpp
#	src/settings_gui.cpp
#	src/ship_cmd.cpp
#	src/stdafx.h
#	src/story.cpp
#	src/story_base.h
#	src/string.cpp
#	src/table/settings/economy_settings.ini
#	src/tests/CMakeLists.txt
#	src/tests/math_func.cpp
This commit is contained in:
Jonathan G Rennison
2023-05-30 00:49:14 +01:00
156 changed files with 2979 additions and 4098 deletions

View File

@@ -26,16 +26,11 @@ enum CompanyWidgets {
WID_C_DESC_INFRASTRUCTURE, ///< Infrastructure.
WID_C_DESC_INFRASTRUCTURE_COUNTS, ///< Infrastructure count.
WID_C_SELECT_DESC_OWNERS, ///< Owners.
WID_C_DESC_OWNERS, ///< Owner in Owners.
WID_C_SELECT_BUTTONS, ///< Selection widget for the button bar.
WID_C_NEW_FACE, ///< Button to make new face.
WID_C_COLOUR_SCHEME, ///< Button to change colour scheme.
WID_C_PRESIDENT_NAME, ///< Button to change president name.
WID_C_COMPANY_NAME, ///< Button to change company name.
WID_C_BUY_SHARE, ///< Button to buy a share.
WID_C_SELL_SHARE, ///< Button to sell a share.
WID_C_SELECT_VIEW_BUILD_HQ, ///< Panel about HQ.
WID_C_VIEW_HQ, ///< Button to view the HQ.

View File

@@ -51,10 +51,9 @@ void DropDownListStringItem::Draw(const Rect &r, bool sel, Colours bg_colour) co
*/
/* static */ bool DropDownListStringItem::NatSortFunc(std::unique_ptr<const DropDownListItem> const &first, std::unique_ptr<const DropDownListItem> const &second)
{
char buffer1[512], buffer2[512];
GetString(buffer1, static_cast<const DropDownListStringItem*>(first.get())->String(), lastof(buffer1));
GetString(buffer2, static_cast<const DropDownListStringItem*>(second.get())->String(), lastof(buffer2));
return strnatcmp(buffer1, buffer2) < 0;
std::string str1 = GetString(static_cast<const DropDownListStringItem*>(first.get())->String());
std::string str2 = GetString(static_cast<const DropDownListStringItem*>(second.get())->String());
return StrNaturalCompare(str1, str2) < 0;
}
StringID DropDownListParamStringItem::String() const

View File

@@ -12,7 +12,10 @@
/** Widgets of the #GameOptionsWindow class. */
enum GameOptionsWidgets {
WID_GO_BACKGROUND, ///< Background of the window.
WID_GO_TAB_GENERAL, ///< General tab.
WID_GO_TAB_GRAPHICS, ///< Graphics tab.
WID_GO_TAB_SOUND, ///< Sound tab.
WID_GO_TAB_SELECTION, ///< Background of the tab selection.
WID_GO_CURRENCY_DROPDOWN, ///< Currency dropdown.
WID_GO_DISTANCE_DROPDOWN, ///< Measuring unit dropdown.
WID_GO_AUTOSAVE_DROPDOWN, ///< Dropdown to say how often to autosave.
@@ -27,10 +30,12 @@ enum GameOptionsWidgets {
WID_GO_BASE_GRF_TEXTFILE, ///< Open base GRF readme, changelog (+1) or license (+2).
WID_GO_BASE_GRF_DESCRIPTION = WID_GO_BASE_GRF_TEXTFILE + TFT_END, ///< Description of selected base GRF.
WID_GO_BASE_SFX_DROPDOWN, ///< Use to select a base SFX.
WID_GO_TEXT_SFX_VOLUME, ///< Sound effects volume label.
WID_GO_BASE_SFX_VOLUME, ///< Change sound effects volume.
WID_GO_BASE_SFX_TEXTFILE, ///< Open base SFX readme, changelog (+1) or license (+2).
WID_GO_BASE_SFX_DESCRIPTION = WID_GO_BASE_SFX_TEXTFILE + TFT_END, ///< Description of selected base SFX.
WID_GO_BASE_MUSIC_DROPDOWN, ///< Use to select a base music set.
WID_GO_TEXT_MUSIC_VOLUME, ///< Music volume label.
WID_GO_BASE_MUSIC_VOLUME, ///< Change music volume.
WID_GO_BASE_MUSIC_JUKEBOX, ///< Open the jukebox.
WID_GO_BASE_MUSIC_STATUS, ///< Info about corrupted files etc.