Save adventure location with team and inventory
This commit is contained in:
16 files changed
+444
-203
No files matched your search
+6
-10
@@ -64,13 +64,11 @@ void check_partner_selection(void)
|
||||
memcpy(saved, test_save, sizeof(saved));
|
||||
/* Reject an out-of-range selection even with a correct checksum. */
|
||||
test_save[5] ^= (5 ^ 6) << 3;
|
||||
test_save[13] ^= (5 ^ 6) << 3;
|
||||
checksum_fixture();
|
||||
load_progress();
|
||||
assert(!partner_owned && active_member == 0);
|
||||
memcpy(test_save, saved, sizeof(saved));
|
||||
test_save[4] = 4;
|
||||
test_save[5] &= 7;
|
||||
test_save[13] ^= 5 ^ 4 ^ (5 << 3);
|
||||
legacy_fixture(4);
|
||||
load_progress();
|
||||
assert(partner_owned && rod_owned && caught_count == 5 && active_member == 0);
|
||||
memset(test_save, 0xff, sizeof(test_save));
|
||||
@@ -138,9 +136,7 @@ void check_fishing(void)
|
||||
assert(cast_rod(x, y));
|
||||
assert(battle_input(B) && battle_input(A));
|
||||
/* An old save keeps catches and balls without granting a rod. */
|
||||
test_save[4] = 3;
|
||||
test_save[5] &= (unsigned char)~4;
|
||||
test_save[13] ^= 5 ^ 3 ^ 4;
|
||||
legacy_fixture(3);
|
||||
load_progress();
|
||||
assert(!rod_owned && has_caught(TIDEFIN) && ball_count == 4);
|
||||
memset(test_save, 0xff, sizeof(test_save));
|
||||
@@ -265,17 +261,17 @@ void check_catching(void)
|
||||
}
|
||||
memcpy(test_save, before, sizeof(before));
|
||||
test_save[7] = 6;
|
||||
test_save[13] ^= 5 ^ 6; /* Valid checksum, invalid party length. */
|
||||
checksum_fixture(); /* Valid CRC, invalid party length. */
|
||||
load_progress();
|
||||
assert(!partner_owned && caught_count == 0);
|
||||
memcpy(test_save, before, sizeof(before));
|
||||
test_save[8] = SPECIES_COUNT;
|
||||
test_save[13] ^= FERNFOX ^ SPECIES_COUNT;
|
||||
checksum_fixture();
|
||||
load_progress();
|
||||
assert(!partner_owned && caught_count == 0);
|
||||
memcpy(test_save, before, sizeof(before));
|
||||
test_save[5] &= (unsigned char)~1;
|
||||
test_save[13] ^= 1;
|
||||
checksum_fixture();
|
||||
load_progress();
|
||||
assert(!partner_owned && caught_count == 0); /* No captured team without Sprout. */
|
||||
|
||||
|
||||
Reference in new issue
Block a user