Advertisement
Guest User

Status_Bar2

a guest
Aug 29th, 2016
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.97 KB | None | 0 0
  1.  
  2. LDY #$E0 ;\ Load $E0 to Y
  3. BIT $0D9B ;| Check bits but do not store
  4. BVC Sprite_Routine ;/ If overflow flag clear, skip code
  5.  
  6. LDY #$00 ;\ Load $00 to Y
  7. LDA $0D9B ;| Load fight mode value
  8. CMP #$C1 ;| and compare with $C1 (bowser battle)
  9. BEQ Sprite_Routine ;/ If equal, skip code
  10.  
  11. LDA #$F0 ;\ Y-position of item
  12. STA $0201,Y ;/ is stored here then
  13.  
  14. Sprite_Routine:
  15. STY $01 ;\ Store previous value from Y here
  16. LDY $0DC2 ;| Load reserved item into Y
  17. BEQ Sprite_Return ;/ If empty, return
  18.  
  19. LDA $8E01,Y ;\ Get data from table
  20. STA $00 ;| and store here
  21. CPY #$03 ;| Compare Y with $03
  22. BNE Draw_Sprite ;/ If not equal, skip code
  23.  
  24. LDA $13 ;\ Frame counter
  25. LSR ;| Divide by 2
  26. AND #$03 ;| AND #$03
  27. PHY ;| Push Y
  28. TAY ;| Transfer A to Y
  29. LDA $8DFE,Y ;| Get data from table
  30. PLY ;| Pull Y
  31. STA $00 ;/ Store here
  32.  
  33. Draw_Sprite:
  34. LDY $01 ;\ Load previous Y value again
  35. LDA #$78 ;| X-position of item
  36. STA $0200,Y ;/ is stored here
  37.  
  38. LDA $1BE3 ;\ Load layer 3 tilemap value
  39. BNE Boss_Item ;/ If not equal, status bar is on top
  40.  
  41. LDA $0D9B ;\ Load fight mode value
  42. BNE Boss_Item ;/ If not equal, item is on top
  43.  
  44. LDA #$C7 ;\ Y-position of item
  45. STA $0201,Y ;| is stored here
  46. BRA Store_Item ;/ Continue code
  47.  
  48. Boss_Item:
  49. LDA #$0F ;\ Y-position of item
  50. STA $0201,Y ;/ is stored here
  51.  
  52. Store_Item:
  53. LDA #$30 ;\ Get properties
  54. ORA $00 ;| and settings from before
  55. STA $0203,Y ;/ and store here
  56. LDX $0DC2 ;| Reserved item into X
  57. LDA $8DF9,X ;| Tilemap from table
  58. STA $0202,Y ;| is stored here
  59. TYA ;| Transfer Y to A
  60. LSR ;| Divide by 2
  61. LSR ;| Divide by 4
  62. TAY ;| Transfer A to Y
  63. LDA #$02 ;| Sprite tilemap
  64. STA $0420,Y ;/ stuff (8x8 / 16x16)
  65.  
  66. Sprite_Return:
  67. RTL ;| Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement