From 9cd502a9f717a4d04aba1c6933ce37cf40807bd6 Mon Sep 17 00:00:00 2001 From: skdltmxn Date: Sun, 6 Feb 2022 03:08:00 +0900 Subject: [PATCH 1/3] Fix staff statistics overflow --- data/language/en-GB.txt | 14 +++++++------- src/openrct2-ui/windows/Staff.cpp | 14 +++++++------- src/openrct2/entity/Staff.h | 14 +++++++------- src/openrct2/park/ParkFile.h | 4 ++-- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/data/language/en-GB.txt b/data/language/en-GB.txt index 54bf5c6a8a..352df35239 100644 --- a/data/language/en-GB.txt +++ b/data/language/en-GB.txt @@ -1700,12 +1700,12 @@ STR_2347 :{RED}{STRINGID} has drowned! STR_2348 :Show statistics for this staff member STR_2349 :{WINDOW_COLOUR_2}Wages: {BLACK}{CURRENCY} per month STR_2350 :{WINDOW_COLOUR_2}Employed: {BLACK}{MONTHYEAR} -STR_2351 :{WINDOW_COLOUR_2}Lawns mown: {BLACK}{COMMA16} -STR_2352 :{WINDOW_COLOUR_2}Gardens watered: {BLACK}{COMMA16} -STR_2353 :{WINDOW_COLOUR_2}Litter swept: {BLACK}{COMMA16} -STR_2354 :{WINDOW_COLOUR_2}Bins emptied: {BLACK}{COMMA16} -STR_2355 :{WINDOW_COLOUR_2}Rides fixed: {BLACK}{COMMA16} -STR_2356 :{WINDOW_COLOUR_2}Rides inspected: {BLACK}{COMMA16} +STR_2351 :{WINDOW_COLOUR_2}Lawns mown: {BLACK}{COMMA32} +STR_2352 :{WINDOW_COLOUR_2}Gardens watered: {BLACK}{COMMA32} +STR_2353 :{WINDOW_COLOUR_2}Litter swept: {BLACK}{COMMA32} +STR_2354 :{WINDOW_COLOUR_2}Bins emptied: {BLACK}{COMMA32} +STR_2355 :{WINDOW_COLOUR_2}Rides fixed: {BLACK}{COMMA32} +STR_2356 :{WINDOW_COLOUR_2}Rides inspected: {BLACK}{COMMA32} STR_2358 :Units STR_2359 :Real Values STR_2360 :Display Resolution: @@ -3624,7 +3624,7 @@ STR_6431 :RMB STR_6432 :Mouse {INT32} STR_6433 :Remove STR_6434 :Remove all bindings for this shortcut. -STR_6435 :{WINDOW_COLOUR_2}Vandals stopped: {BLACK}{COMMA16} +STR_6435 :{WINDOW_COLOUR_2}Vandals stopped: {BLACK}{COMMA32} STR_6436 :Toggle invisibility STR_6437 :Visible STR_6438 :V diff --git a/src/openrct2-ui/windows/Staff.cpp b/src/openrct2-ui/windows/Staff.cpp index 0b0a77e31d..5cd7777df7 100644 --- a/src/openrct2-ui/windows/Staff.cpp +++ b/src/openrct2-ui/windows/Staff.cpp @@ -1079,37 +1079,37 @@ void WindowStaffStatsPaint(rct_window* w, rct_drawpixelinfo* dpi) { case StaffType::Handyman: ft = Formatter(); - ft.Add(peep->StaffLawnsMown); + ft.Add(peep->StaffLawnsMown); DrawTextBasic(dpi, screenCoords, STR_STAFF_STAT_LAWNS_MOWN, ft); screenCoords.y += LIST_ROW_HEIGHT; ft = Formatter(); - ft.Add(peep->StaffGardensWatered); + ft.Add(peep->StaffGardensWatered); DrawTextBasic(dpi, screenCoords, STR_STAFF_STAT_GARDENS_WATERED, ft); screenCoords.y += LIST_ROW_HEIGHT; ft = Formatter(); - ft.Add(peep->StaffLitterSwept); + ft.Add(peep->StaffLitterSwept); DrawTextBasic(dpi, screenCoords, STR_STAFF_STAT_LITTER_SWEPT, ft); screenCoords.y += LIST_ROW_HEIGHT; ft = Formatter(); - ft.Add(peep->StaffBinsEmptied); + ft.Add(peep->StaffBinsEmptied); DrawTextBasic(dpi, screenCoords, STR_STAFF_STAT_BINS_EMPTIED, ft); break; case StaffType::Mechanic: ft = Formatter(); - ft.Add(peep->StaffRidesInspected); + ft.Add(peep->StaffRidesInspected); DrawTextBasic(dpi, screenCoords, STR_STAFF_STAT_RIDES_INSPECTED, ft); screenCoords.y += LIST_ROW_HEIGHT; ft = Formatter(); - ft.Add(peep->StaffRidesFixed); + ft.Add(peep->StaffRidesFixed); DrawTextBasic(dpi, screenCoords, STR_STAFF_STAT_RIDES_FIXED, ft); break; case StaffType::Security: ft = Formatter(); - ft.Add(peep->StaffVandalsStopped); + ft.Add(peep->StaffVandalsStopped); DrawTextBasic(dpi, screenCoords, STR_STAFF_STAT_VANDALS_STOPPED, ft); break; case StaffType::Entertainer: diff --git a/src/openrct2/entity/Staff.h b/src/openrct2/entity/Staff.h index dff443a1aa..e35939a29e 100644 --- a/src/openrct2/entity/Staff.h +++ b/src/openrct2/entity/Staff.h @@ -38,20 +38,20 @@ public: uint8_t StaffMowingTimeout; union { - uint16_t StaffLawnsMown; - uint16_t StaffRidesFixed; + uint32_t StaffLawnsMown; + uint32_t StaffRidesFixed; }; union { - uint16_t StaffGardensWatered; - uint16_t StaffRidesInspected; + uint32_t StaffGardensWatered; + uint32_t StaffRidesInspected; }; union { - uint16_t StaffLitterSwept; - uint16_t StaffVandalsStopped; + uint32_t StaffLitterSwept; + uint32_t StaffVandalsStopped; }; - uint16_t StaffBinsEmptied; + uint32_t StaffBinsEmptied; void UpdateStaff(uint32_t stepsToTake); void Tick128UpdateStaff(); diff --git a/src/openrct2/park/ParkFile.h b/src/openrct2/park/ParkFile.h index a58be99eb7..a3f7ba01e4 100644 --- a/src/openrct2/park/ParkFile.h +++ b/src/openrct2/park/ParkFile.h @@ -8,10 +8,10 @@ struct ObjectRepositoryItem; namespace OpenRCT2 { // Current version that is saved. - constexpr uint32_t PARK_FILE_CURRENT_VERSION = 0x8; + constexpr uint32_t PARK_FILE_CURRENT_VERSION = 0x9; // The minimum version that is forwards compatible with the current version. - constexpr uint32_t PARK_FILE_MIN_VERSION = 0x8; + constexpr uint32_t PARK_FILE_MIN_VERSION = 0x9; constexpr uint32_t PARK_FILE_MAGIC = 0x4B524150; // PARK From 78549b50536eaf5499c63dce6f5c4c75fb25f672 Mon Sep 17 00:00:00 2001 From: duncanspumpkin Date: Sun, 13 Feb 2022 17:35:23 +0000 Subject: [PATCH 2/3] Update replays --- CMakeLists.txt | 4 ++-- openrct2.proj | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 50b1c79bdb..5556e63842 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,9 +68,9 @@ set(OBJECTS_VERSION "1.2.6") set(OBJECTS_URL "https://github.com/OpenRCT2/objects/releases/download/v${OBJECTS_VERSION}/objects.zip") set(OBJECTS_SHA1 "cd86dd2e42edb513b18293ef7ae52a93a7cdfc57") -set(REPLAYS_VERSION "0.0.63") +set(REPLAYS_VERSION "0.0.64") set(REPLAYS_URL "https://github.com/OpenRCT2/replays/releases/download/v${REPLAYS_VERSION}/replays.zip") -set(REPLAYS_SHA1 "1614D0B51393AC73C7CA23402B5B87D082EA3002") +set(REPLAYS_SHA1 "E8DA520B3462090D894F0E7B844C5AB646BFB12E") option(FORCE32 "Force 32-bit build. It will add `-m32` to compiler flags.") option(WITH_TESTS "Build tests") diff --git a/openrct2.proj b/openrct2.proj index 71e0186663..13b86618b9 100644 --- a/openrct2.proj +++ b/openrct2.proj @@ -48,8 +48,8 @@ 304d13a126c15bf2c86ff13b81a2f2cc1856ac8d https://github.com/OpenRCT2/objects/releases/download/v1.2.6/objects.zip cd86dd2e42edb513b18293ef7ae52a93a7cdfc57 - https://github.com/OpenRCT2/replays/releases/download/v0.0.63/replays.zip - 1614D0B51393AC73C7CA23402B5B87D082EA3002 + https://github.com/OpenRCT2/replays/releases/download/v0.0.64/replays.zip + E8DA520B3462090D894F0E7B844C5AB646BFB12E From 4d341c85181c417ff8bdddb3b003773f47755c5c Mon Sep 17 00:00:00 2001 From: duncanspumpkin Date: Mon, 14 Feb 2022 07:42:40 +0000 Subject: [PATCH 3/3] Update network version --- src/openrct2/network/NetworkBase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openrct2/network/NetworkBase.cpp b/src/openrct2/network/NetworkBase.cpp index b21f424f5b..59822ff111 100644 --- a/src/openrct2/network/NetworkBase.cpp +++ b/src/openrct2/network/NetworkBase.cpp @@ -42,7 +42,7 @@ // This string specifies which version of network stream current build uses. // It is used for making sure only compatible builds get connected, even within // single OpenRCT2 version. -#define NETWORK_STREAM_VERSION "15" +#define NETWORK_STREAM_VERSION "16" #define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION static Peep* _pickup_peep = nullptr;