Skip to content

Instantly share code, notes, and snippets.

@ISSOtm
Created April 23, 2019 11:56
Show Gist options
  • Save ISSOtm/33d6afe013fddfc30e5034fe2ca5ce8c to your computer and use it in GitHub Desktop.
Save ISSOtm/33d6afe013fddfc30e5034fe2ca5ce8c to your computer and use it in GitHub Desktop.
Unexpected behavior with BGB's "run to next line" command
; 1/2
ld hl, wMovementVector + 3
sra [hl]
dec l ; dec hl
rr [hl]
dec l ; dec hl
sra [hl]
dec l ; dec hl
rr [hl]
call .tryMoving
; 1/2 + 1/4
ld hl, wMovementVector + 3
sra [hl]
dec l ; dec hl
rr [hl]
dec l ; dec hl
sra [hl]
dec l ; dec hl
rr [hl]
call .tryMoving ; <-- This is the offending call
; 1/2 + 1/4 + 1/4
.tryMoving
; (SNIP)
ret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment