1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-27 00:34:46 +01:00

Merge branch 'develop' into new-save-format

This commit is contained in:
Hielke Morsink
2021-10-19 22:26:08 +02:00
97 changed files with 4991 additions and 3732 deletions

View File

@@ -279,7 +279,8 @@ TEST(SeaDecrypt, DecryptSea)
auto path = TestData::GetParkPath("volcania.sea");
auto decrypted = DecryptSea(path);
auto sha1 = Crypt::SHA1(decrypted.data(), decrypted.size());
std::array<uint8_t, 20> expected = { 0x1B, 0x85, 0xFC, 0xC0, 0xE8, 0x9B, 0xBE, 0x72, 0xD9, 0x1F,
0x6E, 0xC8, 0xB1, 0xFF, 0xEC, 0x70, 0x2A, 0x72, 0x05, 0xBB };
std::array<uint8_t, 20> expected = {
0x1B, 0x85, 0xFC, 0xC0, 0xE8, 0x9B, 0xBE, 0x72, 0xD9, 0x1F, 0x6E, 0xC8, 0xB1, 0xFF, 0xEC, 0x70, 0x2A, 0x72, 0x05, 0xBB,
};
ASSERT_EQ(sha1, expected);
}

View File

@@ -503,20 +503,35 @@ const uint8_t SawyerCodingTest::rotatedata[] = {
0x40, 0x7d, 0xf4, 0xfa, 0x2f, 0x6b, 0x93, 0x44, 0x5e,
};
const uint8_t SawyerCodingTest::invalid1[] = { 0x02, 0x04, 0x00, 0x00, 0x00, 0xd4, 0xff, 0xce, 0xcf, 0x2e, 0x00 };
const uint8_t SawyerCodingTest::invalid1[] = {
0x02, 0x04, 0x00, 0x00, 0x00, 0xd4, 0xff, 0xce, 0xcf, 0x2e, 0x00,
};
const uint8_t SawyerCodingTest::invalid2[] = { 0x02, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x27, 0x3f, 0x01, 0x00 };
const uint8_t SawyerCodingTest::invalid2[] = {
0x02, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x27, 0x3f, 0x01, 0x00,
};
const uint8_t SawyerCodingTest::invalid3[] = { 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x73 };
const uint8_t SawyerCodingTest::invalid3[] = {
0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x73,
};
const uint8_t SawyerCodingTest::invalid4[] = { 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00 };
const uint8_t SawyerCodingTest::invalid4[] = {
0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const uint8_t SawyerCodingTest::invalid5[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0xdf, 0x00, 0x00 };
const uint8_t SawyerCodingTest::invalid5[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0xdf, 0x00, 0x00,
};
const uint8_t SawyerCodingTest::invalid6[] = { 0x02, 0x02, 0x00, 0x00, 0x00, 0x28, 0x7f };
const uint8_t SawyerCodingTest::invalid6[] = {
0x02, 0x02, 0x00, 0x00, 0x00, 0x28, 0x7f,
};
const uint8_t SawyerCodingTest::invalid7[] = { 0x01, 0x01, 0x00, 0x00, 0x00, 0x00 };
const uint8_t SawyerCodingTest::invalid7[] = {
0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
};
// This needs to be non-empty to satisfy MSVC. We still pass zero as length.
const uint8_t SawyerCodingTest::empty[] = { 0x00 };
const uint8_t SawyerCodingTest::empty[] = {
0x00,
};