mirror of
https://github.com/a2-4am/4cade.git
synced 2024-11-27 08:50:01 +00:00
refactor ToggleCheats
This commit is contained in:
parent
5bc3ef8ab4
commit
2f302ce8b0
@ -9,7 +9,7 @@
|
||||
; D000..E5F4 - persistent data structures (per-game cheat categories,
|
||||
; gGlobalPrefsStore, gGamesListStore)
|
||||
; ...unused...
|
||||
; EC85..FFF9 - main program code
|
||||
; EC89..FFF9 - main program code
|
||||
; FFFA..FFFF - NMI, reset, IRQ vectors
|
||||
;
|
||||
; LC RAM BANK 2
|
||||
|
@ -11,14 +11,13 @@ ToggleCheat
|
||||
; in: none
|
||||
; out: all registers clobbered
|
||||
; X = 0, Z = 1 (guaranteed by pref_set)
|
||||
ldx #$B0
|
||||
lda gCheatsEnabled
|
||||
eor #$80
|
||||
sta gCheatsEnabled
|
||||
beq +
|
||||
lda #$B1
|
||||
+HIDE_NEXT_2_BYTES
|
||||
+ lda #$B0
|
||||
sta @val
|
||||
inx
|
||||
+ stx @val
|
||||
jsr pref_set
|
||||
!word kCheat
|
||||
!word @pref
|
||||
|
Loading…
Reference in New Issue
Block a user