Skip to content

Commit

Permalink
fix issues with hidden programs
Browse files Browse the repository at this point in the history
  • Loading branch information
mateoconlechuga committed Nov 22, 2018
1 parent 5469d04 commit 70ffca2
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions src/features.asm
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,14 @@ feature_item_attributes:
.programs:
ld a,(iy + prgm_flag)
ld (iy + temp_prgm_flag),a
ld a,$c9
ld hl,.check_hide_smc
ld (hl),a
xor a,a
ld (current_option_selection),a
bit prgm_archived,(iy + prgm_flag)
jr nz,.show_edit
ld (hl),a
.show_edit:
ld a,(color_tertiary)
ld (lcd_text_bg),a ; highlight the currently selected item
Expand Down Expand Up @@ -400,13 +406,21 @@ feature_item_attributes:
push hl
ld a,(current_option_selection)
dec a
jr nz,.checked_lockable
jr z,.check_lock
dec a
jr z,.check_hide
jr .toggle_option
.check_hide:
ret
.check_hide_smc := $ - 1
jr .toggle_option
.check_lock:
ld a,(prgm_type)
cp a,file_basic ; basic programs
jr z,.checked_lockable
jr z,.toggle_option
cp a,file_ice_source ; ice source programs
ret nz
.checked_lockable:
.toggle_option:
ld a,(current_option_selection)
inc a
call util_to_one_hot
Expand Down

0 comments on commit 70ffca2

Please sign in to comment.