LRStatus
by circlefriendo
Game: SMW
Description: L and R button indicators on the status bar
!LRDisabled = $7f9da1 !LPower = $7f9da2 !RPower = $7f9da3 !LRTimer = $1401 !scrolling = $13fd !buttons = $17 !blank = #$fc !L = #$15 !R = #$1b !equals = #$77 !disabled = #$26 !exclaim = #$28 !BelowL = $0f1f !BelowR = $0f24 ; clear status bar lda !blank sta $0f03 sta $0f1e sta $0f1f sta $0f24 sta $0f1b sta $0f1c ; display "L" and "R" lda !L sta $0f04 lda !R sta $0f09 lda !LRDisabled beq powers stz !LRTimer lda !disabled sta !BelowL sta !BelowR powers: lda !LPower beq rpower lda !exclaim sta !BelowL rpower: lda !RPower beq clearflags lda !exclaim sta !BelowR clearflags: lda #$00 sta !LRDisabled sta !LPower sta !RPower scrolling: ; if timer running or scrolling lda !LRTimer ora !scrolling beq end lda !buttons and #$20 ; L beq R lda !equals sta $0f1f R: lda !buttons and #$10 ; R beq end lda !equals sta $0f24 end: rtlback to listings