Advertisement
NovaYoshi

metatile drawer

Sep 26th, 2022
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. ScrollUpdateTop::
  2. ld b, 6
  3. .loop:
  4. push bc
  5.  
  6. ; Get first block
  7. ld a, [de]
  8. inc e
  9. add a
  10. add a
  11. ld b, a
  12.  
  13. ; Get second block
  14. ld a, [de]
  15. inc e
  16. add a
  17. add a
  18. ld c, a
  19.  
  20. ; Write
  21. push de
  22. ld d, HIGH(BlockAppearance)
  23.  
  24. ld e, b
  25. wait_vram
  26. ld a, [de] ; 2
  27. ld [hl+], a ; 2
  28. inc e ; 1
  29. ld a, [de] ; 2
  30. ld [hl+], a ; 2
  31.  
  32. ld e, c
  33. wait_vram
  34. ld a, [de] ; 2
  35. ld [hl+], a ; 2
  36. inc e ; 1
  37. ld a, [de] ; 2
  38. ld [hl+], a ; 2
  39.  
  40. pop de
  41. pop bc
  42.  
  43. dec b
  44. jr nz, .loop
  45. ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement