I used Easy 6502 to test these out, using the debugger console and pressing "Step" to read each line. If the code skips over any line of code following these particular mnemonics, then it should work correctly. But if it reads all the lines in this code, which it did when I tried it in Easy 6502, then I believe (part of) it may not work correctly.
Example 1:
Code: Select all
NYSpd: ldy #$01 ; set player's vertical speed to nullify
lda AreaType ; nullify player's vertical speed if underwater
bne NYSpd2 ; branch if not underwater
dey ; if so, decrement value in Y
NYSpd2: sty Player_Y_Speed ; store current value in Y
But when I changed it to this...
Code: Select all
NYSpd: ldy #$01 ; set player's vertical speed to nullify
lda AreaType
cmp #$00 ; check world type for underwater stage
bcc NYSpd2 ; branch if not underwater
dey ; if so, decrement value in Y
NYSpd2: sty Player_Y_Speed ; store current value in Y
~Ben