SHOW:
|
|
- or go back to the newest paste.
1 | - | LDA myKeys ;;Load Keys into accumulator |
1 | + | INC myKeys ;; Increase the number of keys by one |
2 | - | CLC ;;We're doing addition so let's clear the Carry flag so we don't get anomalous behavior. |
2 | + | CMP #$08 ;;Compare the result of the last instruction to 8 |
3 | - | ADC #$01 ;;Add 1 |
3 | + | |
4 | - | CMP #$08 ;;Compare to number 8 |
4 | + | |
5 | LDA #STATE_WIN_GAME ;;WinGame State | |
6 | STA change_state ;;Save into change_state | |
7 | LDA #$01 ;;Load the number 1 | |
8 | STA newScreen ;;Save in newScreen | |
9 | ||
10 | notEnoughKeys: ;;Not enough keys, so... | |
11 | TriggerScreen screenType ;;Trigger the screen so we can't get infinite keys. |