From 4e282f87d2f2ee80e7d136ab6d335227a438caa1 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Sun, 17 Apr 2016 23:50:41 -0700 Subject: Save State menu option is now fully functional. Load state sort of works, but is mostly broken. --- menu.s68 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'menu.s68') diff --git a/menu.s68 b/menu.s68 index 606e017..7a7727d 100644 --- a/menu.s68 +++ b/menu.s68 @@ -192,6 +192,7 @@ mouse_shown rs.b 1 last_mbuttons rs.b 1 num_menu rs.b 1 num_slots rs.b 1 +port_off rs.b 1 int_6: @@ -353,6 +354,8 @@ select_entry: add.w d0, d0 tst.b num_menu.w bne .select_menu_button + tst.b num_slots.w + bne .select_save_slot lea page_index.w, a2 move.l (0, a2, d0.w), a2 tst.b (-1, a2) @@ -368,6 +371,16 @@ select_entry: move.l (0, a2, d0.w), a2 addq #6, a7 jmp (a2) +.select_save_slot: + lea menu_port, a3 + moveq #0, d0 + move.b port_off.w, d0 + add.w d0, a3 + move.b selected.w, d0 + move.l d0, (a3) + addq #6, a7 + jmp show_pause_menu + enter_dir: lea menu_port+4, a3 move.l a2, (a3) @@ -977,12 +990,14 @@ show_save_slots: rts save_state: + move.b #(5*4), port_off.w bsr show_save_slots .wait stop #$2500 bra .wait load_state: + move.b #(6*4), port_off.w bsr show_save_slots .wait stop #$2500 -- cgit v1.2.3