1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-04 13:42:55 +01:00

Move kResearchFundingLevelNames to Research unit

This commit is contained in:
Aaron van Geffen
2024-07-13 11:31:17 +02:00
parent 8134ca069a
commit a33e06a9d0
5 changed files with 14 additions and 11 deletions

View File

@@ -493,10 +493,10 @@ static Widget *window_research_page_widgets[] = {
Widget* dropdownWidget = &w->widgets[widgetIndex - 1];
for (std::size_t i = 0; i < std::size(ResearchFundingLevelNames); i++)
for (std::size_t i = 0; i < std::size(kResearchFundingLevelNames); i++)
{
gDropdownItems[i].Format = STR_DROPDOWN_MENU_LABEL;
gDropdownItems[i].Args = ResearchFundingLevelNames[i];
gDropdownItems[i].Args = kResearchFundingLevelNames[i];
}
WindowDropdownShowTextCustomWidth(
{ w->windowPos.x + dropdownWidget->left, w->windowPos.y + dropdownWidget->top }, dropdownWidget->height() + 1,
@@ -560,7 +560,7 @@ static Widget *window_research_page_widgets[] = {
// Current funding
int32_t currentResearchLevel = gameState.ResearchFundingLevel;
w->widgets[WIDX_RESEARCH_FUNDING + widgetOffset].text = ResearchFundingLevelNames[currentResearchLevel];
w->widgets[WIDX_RESEARCH_FUNDING + widgetOffset].text = kResearchFundingLevelNames[currentResearchLevel];
// Checkboxes
uint8_t activeResearchTypes = gameState.ResearchPriorities;

View File

@@ -29,13 +29,6 @@ using namespace OpenRCT2;
thread_local char gCommonStringFormatBuffer[CommonTextBufferSize];
// clang-format off
const StringId ResearchFundingLevelNames[] = {
STR_RESEARCH_FUNDING_NONE,
STR_RESEARCH_FUNDING_MINIMUM,
STR_RESEARCH_FUNDING_NORMAL,
STR_RESEARCH_FUNDING_MAXIMUM,
};
const StringId RideInspectionIntervalNames[] = {
STR_EVERY_10_MINUTES,
STR_EVERY_20_MINUTES,

View File

@@ -22,6 +22,5 @@ constexpr size_t CommonTextBufferSize = 512;
extern thread_local char gCommonStringFormatBuffer[CommonTextBufferSize];
extern const StringId ResearchFundingLevelNames[4];
extern const StringId RideInspectionIntervalNames[];
extern const StringId PeepThoughts[174];

View File

@@ -57,6 +57,15 @@ static bool _researchedSceneryItems[SCENERY_TYPE_COUNT][UINT16_MAX];
bool gSilentResearch = false;
// clang-format off
const StringId kResearchFundingLevelNames[] = {
STR_RESEARCH_FUNDING_NONE,
STR_RESEARCH_FUNDING_MINIMUM,
STR_RESEARCH_FUNDING_NORMAL,
STR_RESEARCH_FUNDING_MAXIMUM,
};
// clang-format on
/**
*
* rct2: 0x006671AD, part of 0x00667132

View File

@@ -117,6 +117,8 @@ enum
extern bool gSilentResearch;
extern const StringId kResearchFundingLevelNames[4];
void ResearchResetItems(OpenRCT2::GameState_t& gameState);
void ResearchUpdateUncompletedTypes();
void ResearchUpdate();