From 79acb6a07319b4dbb6b108e11be08b8de27f976a Mon Sep 17 00:00:00 2001 From: Matt Date: Sun, 22 Dec 2019 07:41:40 +0100 Subject: [PATCH] Move staff wage data to Staff.cpp/h --- src/openrct2-ui/windows/Staff.cpp | 2 +- src/openrct2-ui/windows/StaffList.cpp | 2 +- src/openrct2/peep/Staff.cpp | 12 ++++++++++++ src/openrct2/peep/Staff.h | 2 ++ 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/openrct2-ui/windows/Staff.cpp b/src/openrct2-ui/windows/Staff.cpp index deef0e72ad..ff48a855b3 100644 --- a/src/openrct2-ui/windows/Staff.cpp +++ b/src/openrct2-ui/windows/Staff.cpp @@ -1106,7 +1106,7 @@ void window_staff_stats_paint(rct_window* w, rct_drawpixelinfo* dpi) if (!(gParkFlags & PARK_FLAGS_NO_MONEY)) { - set_format_arg(0, money32, wage_table[peep->staff_type]); + set_format_arg(0, money32, gStaffWageTable[peep->staff_type]); gfx_draw_string_left(dpi, STR_STAFF_STAT_WAGES, gCommonFormatArgs, COLOUR_BLACK, x, y); y += LIST_ROW_HEIGHT; } diff --git a/src/openrct2-ui/windows/StaffList.cpp b/src/openrct2-ui/windows/StaffList.cpp index c35228372e..4b9e4266e9 100644 --- a/src/openrct2-ui/windows/StaffList.cpp +++ b/src/openrct2-ui/windows/StaffList.cpp @@ -614,7 +614,7 @@ void window_staff_list_paint(rct_window* w, rct_drawpixelinfo* dpi) if (!(gParkFlags & PARK_FLAGS_NO_MONEY)) { - set_format_arg(0, money32, wage_table[selectedTab]); + set_format_arg(0, money32, gStaffWageTable[selectedTab]); gfx_draw_string_left(dpi, STR_COST_PER_MONTH, gCommonFormatArgs, COLOUR_BLACK, w->x + w->width - 155, w->y + 0x20); } diff --git a/src/openrct2/peep/Staff.cpp b/src/openrct2/peep/Staff.cpp index ddf6621c7f..9277c54798 100644 --- a/src/openrct2/peep/Staff.cpp +++ b/src/openrct2/peep/Staff.cpp @@ -42,6 +42,18 @@ #include #include +/** + * Monthly staff wages + * + * rct2: 0x00992A00 + */ +const money32 gStaffWageTable[STAFF_TYPE_COUNT] = { + MONEY(50, 00), // Handyman + MONEY(80, 00), // Mechanic + MONEY(60, 00), // Security guard + MONEY(55, 00), // Entertainer +}; + // clang-format off const rct_string_id StaffCostumeNames[] = { STR_STAFF_OPTION_COSTUME_PANDA, diff --git a/src/openrct2/peep/Staff.h b/src/openrct2/peep/Staff.h index 775ec75e1d..0684ad1565 100644 --- a/src/openrct2/peep/Staff.h +++ b/src/openrct2/peep/Staff.h @@ -62,6 +62,8 @@ enum ENTERTAINER_COSTUME : uint8_t ENTERTAINER_COSTUME_COUNT }; +extern const money32 gStaffWageTable[STAFF_TYPE_COUNT]; + extern const rct_string_id StaffCostumeNames[ENTERTAINER_COSTUME_COUNT]; extern uint32_t gStaffPatrolAreas[(STAFF_MAX_COUNT + STAFF_TYPE_COUNT) * STAFF_PATROL_AREA_SIZE];