Advertisement
PikalaxALT

Function4e779

Dec 14th, 2015
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Function4e779: ; 4e779
  2.     call DelayFrame
  3.     push bc
  4.     call JoyTextDelay
  5.     ld a, [hJoyDown]
  6.     pop bc
  7.     and A_BUTTON
  8.     jr nz, .pressed_a
  9.     and B_BUTTON
  10.     jr nz, .pressed_b
  11. .loop
  12.     dec c
  13.     jr nz, Function4e779
  14.     and a
  15.     ret
  16.  
  17. .pressed_a
  18.     ld a, [wd1e9]
  19.     bit 0, a
  20.     jr nz, .loop
  21.     and a
  22.     jr z, .loop
  23.     dec a
  24.     dec a
  25.     jr .loop
  26.  
  27. .pressed_b
  28.     ld a, [wd1e9]
  29.     bit 0, a
  30.     jr nz, .loop
  31.     inc a
  32.     inc a
  33.     cp 8
  34.     jr c, .loop
  35.     scf
  36.     ret
  37. ; 4e794
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement