Add manual cartridge saving and a right-side menu

This commit is contained in:
LyokoAgents committed 2026-10-28 22:38:53 +00:00
1 parent cb77683a87
commit 1141765231
17 files changed
+449 -63

No files matched your search

+20 -9
View File
@@ -86,6 +86,25 @@ int main(void)
unsigned now = movement_time();
music_update(now);
if (pressed & R_BUTTON) music_toggle_mute();
int menu_was_open = save_menu.phase != SAVE_MENU_CLOSED;
int menu_changed = save_menu_input(keys,
!team_open && battle.phase == BATTLE_OFF && dialogue_page < 0);
if (menu_was_open || save_menu.phase != SAVE_MENU_CLOSED) {
pause_movement_at(now);
if (menu_changed) {
if (save_menu.phase == SAVE_MENU_CLOSED) {
DISPLAY = 0x0080;
draw_scene(x, y);
present_frame();
DISPLAY = 0x0403;
} else {
draw_save_menu();
present_frame();
}
pause_movement_at(movement_time());
} else present_frame();
continue;
}
int movement_ticks = 0;
if (team_open || battle.phase != BATTLE_OFF || dialogue_page >= 0)
pause_movement_at(now);
@@ -169,15 +188,7 @@ int main(void)
int old_follower_x = follower_x, old_follower_y = follower_y;
enum Facing old_facing = player_facing;
enum WalkResult walk = WALK_NORMAL;
if (pressed & START) {
reset_position(&x, &y);
greeting = 0;
location_status(x, y);
pause_movement_at(now);
movement_ticks = 0;
} else {
walk = walk_movement(keys, &x, &y, movement_ticks);
}
walk = walk_movement(keys, &x, &y, movement_ticks);
if (walk == WALK_MAP_CHANGED) {
greeting = 0;
dialogue_page = -1;