From bbd24c9eb98e55f65d5b9f2b87b6a29069aae243 Mon Sep 17 00:00:00 2001 From: Ted John Date: Sat, 15 Dec 2018 23:19:36 +0000 Subject: [PATCH] Update writing of authoring chunk --- src/openrct2/ParkFile.cpp | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/src/openrct2/ParkFile.cpp b/src/openrct2/ParkFile.cpp index 67659f6699..fc964f752b 100644 --- a/src/openrct2/ParkFile.cpp +++ b/src/openrct2/ParkFile.cpp @@ -19,6 +19,7 @@ #include #include +#include #include #include #include @@ -235,7 +236,11 @@ namespace OpenRCT2 { BeginChunk(ParkFileChunkType::AUTHORING); WriteString(gVersionInfoFull); - WriteString("Some notes..."); + BeginArray(); + EndArray(); + WriteString(""); // custom notes that can be attached to the save + WriteValue(std::time(0)); // date started + WriteValue(std::time(0)); // date modified EndChunk(); } @@ -290,8 +295,7 @@ namespace OpenRCT2 WriteValue(gScenarioObjectiveCurrency); // shop profit WriteValue(gScenarioCompletedCompanyValue); - if (gScenarioCompletedCompanyValue == MONEY32_UNDEFINED || - gScenarioCompletedCompanyValue == (money32)0x80000001) + if (gScenarioCompletedCompanyValue == MONEY32_UNDEFINED || gScenarioCompletedCompanyValue == (money32)0x80000001) { WriteString(""); } @@ -505,14 +509,14 @@ namespace OpenRCT2 String::Set(gS6Info.details, sizeof(gS6Info.details), gScenarioName); gScenarioObjectiveType = ReadValue(); - gScenarioObjectiveYear = ReadValue(); // year - gScenarioObjectiveNumGuests = ReadValue(); // guests - ReadValue(); // rating - ReadValue(); // excitement - ReadValue(); // length - gScenarioObjectiveCurrency = ReadValue(); // park value - ReadValue(); // ride profit - ReadValue(); // shop profit + gScenarioObjectiveYear = ReadValue(); // year + gScenarioObjectiveNumGuests = ReadValue(); // guests + ReadValue(); // rating + ReadValue(); // excitement + ReadValue(); // length + gScenarioObjectiveCurrency = ReadValue(); // park value + ReadValue(); // ride profit + ReadValue(); // shop profit gScenarioCompletedCompanyValue = ReadValue(); String::Set(gScenarioCompletedBy, sizeof(gScenarioCompletedBy), ReadString().c_str());