SHARE
TWEET

smooth hp bar scrolling

luckytyphlosion Sep 27th, 2015 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. UpdateHPBar_AnimateHPBar: ; fab1 (3:7ab1)
  2.         push hl
  3. .barAnimationLoop
  4.         push af
  5.         push de
  6.         ld d, $6
  7.         call DrawHPBar
  8.         ld a, [wHPBarType]
  9.         dec a ; battle hp scroll, player
  10.         ld a, TRANSFERMIDDLE
  11.         jr z, .delayframe
  12.         ld a, [wHPBarType]
  13.         and a ; battle hp scroll, enemy
  14.         ld a, TRANSFERTOP
  15.         jr z, .delayframe
  16. ; status screen
  17.         ld a, [wcf06] ; wUsedItemOnWhichPokemon
  18.         cp $3
  19.         ld a, TRANSFERTOP
  20.         jr c, .delayframe
  21.         ld a, TRANSFERMIDDLE   
  22. .delayframe
  23.         ld [H_AUTOBGTRANSFERPORTION], a
  24.         call DelayFrame
  25.         pop de
  26.         ld a, [wHPBarDelta] ; +1 or -1
  27.         add e
  28.         cp $31
  29.         ; ...
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top