Add manual cartridge saving and a right-side menu
This commit is contained in:
17 files changed
+449
-63
No files matched your search
@@ -33,6 +33,11 @@ void check_starter_gift(void)
|
||||
dialogue_box(1);
|
||||
write_preview("build/starter-gift-preview.ppm");
|
||||
assert(!receive_partner()); /* The same gift cannot add a second partner. */
|
||||
for (int i = 0; i < (int)sizeof(test_save); ++i) assert(test_save[i] == 0xff);
|
||||
load_progress();
|
||||
assert(!partner_owned);
|
||||
assert(receive_partner());
|
||||
save_from_menu();
|
||||
unsigned char saved[sizeof(test_save)];
|
||||
memcpy(saved, test_save, sizeof(saved));
|
||||
assert(advance_conversation(1) == -1);
|
||||
@@ -58,6 +63,11 @@ void check_starter_gift(void)
|
||||
partner_owned = 0;
|
||||
load_progress();
|
||||
assert(partner_owned);
|
||||
current_room = MELLON_HOUSE;
|
||||
assert(begin_conversation(PROF_X, PROF_Y + 22) && !gift_conversation);
|
||||
assert(!receive_partner());
|
||||
assert(advance_conversation(0) == 1 && advance_conversation(1) == -1);
|
||||
current_room = OUTSIDE;
|
||||
draw_team();
|
||||
write_preview("build/team-preview.ppm");
|
||||
static u16 expected[WIDTH * HEIGHT];
|
||||
@@ -132,6 +142,12 @@ void check_ball_gift(void)
|
||||
restore(DIALOGUE_X, DIALOGUE_Y, DIALOGUE_W, DIALOGUE_H);
|
||||
actors(99, 97, 0);
|
||||
assert(memcmp(expected, SCREEN, sizeof(expected)) == 0);
|
||||
assert(test_save[4] == 1 && memcmp(test_save, legacy, sizeof(legacy)) == 0);
|
||||
load_progress();
|
||||
assert(partner_owned && !balls_given && ball_count == 0);
|
||||
assert(begin_conversation(99, 97));
|
||||
assert(advance_conversation(0) == 1 && advance_conversation(1) == -1);
|
||||
save_from_menu();
|
||||
assert(test_save[4] == 5);
|
||||
unsigned char saved[sizeof(test_save)];
|
||||
memcpy(saved, test_save, sizeof(saved));
|
||||
@@ -144,6 +160,9 @@ void check_ball_gift(void)
|
||||
partner_owned = balls_given = ball_count = 0;
|
||||
load_progress();
|
||||
assert(partner_owned && balls_given && ball_count == 5);
|
||||
assert(begin_conversation(99, 97) && !ball_gift_conversation);
|
||||
assert(!receive_balls());
|
||||
assert(advance_conversation(0) == 1 && advance_conversation(1) == -1);
|
||||
draw_team();
|
||||
write_preview("build/poke-balls-preview.ppm");
|
||||
for (int i = SAVE_RECORD_SIZE; i < (int)sizeof(test_save); ++i) assert(test_save[i] == 0xff);
|
||||
@@ -157,11 +176,13 @@ void check_ball_gift(void)
|
||||
current_room = ROUTE;
|
||||
assert(begin_conversation(99, 97));
|
||||
assert(advance_conversation(0) == 1 && advance_conversation(1) == -1);
|
||||
save_from_menu();
|
||||
load_progress();
|
||||
assert(!partner_owned && balls_given && ball_count == 5);
|
||||
current_room = MELLON_HOUSE;
|
||||
assert(begin_conversation(PROF_X, PROF_Y + 22));
|
||||
assert(advance_conversation(0) == 1 && advance_conversation(1) == -1);
|
||||
save_from_menu();
|
||||
load_progress();
|
||||
assert(partner_owned && balls_given && ball_count == 5);
|
||||
memcpy(saved, test_save, sizeof(saved));
|
||||
|
||||
Reference in new issue
Block a user