Advertisement
Guest User

Untitled

a guest
Dec 19th, 2014
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.25 KB | None | 0 0
  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;; Display Level Message DX, by yoshicookiezeus
  3. ;;
  4. ;; Based off Dispari Scuro's NPCv3.0 sprite and the disassembly of the "Display Level Message 1" sprite from all.log
  5. ;;
  6. ;; The below description is also from the NPC sprite.
  7. ;;
  8. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  9.  
  10. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  11. ; sprite constants - feel free to change these
  12. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  13.  
  14. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  15. ; ROM and RAM defines - don't mess with these
  16. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  17.  
  18. !RAM_SpritesLocked = $9D
  19. !RAM_SpriteNum = $9E
  20. !RAM_SpriteState = $C2
  21. !RAM_SpriteStatus = $14C8
  22.  
  23. !RAM_BigBooIndex = $1504
  24. !RAM_BigBooHP = $1534
  25.  
  26. !RAM_ActivityFlag = $58
  27.  
  28. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  29. ; init JSL
  30. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  31.  
  32. print "INIT ",pc
  33. LDA #$FF
  34. STA !RAM_ActivityFlag
  35.  
  36. LDY #$09
  37. Init_LoopStart:
  38. LDA.w !RAM_SpriteNum,y
  39. CMP #$C5
  40. BEQ Init_Found
  41. DEY
  42. BPL Init_LoopStart
  43. RTL
  44.  
  45. Init_Found:
  46. TYA
  47. STA !RAM_BigBooIndex,x
  48. RTL
  49.  
  50.  
  51. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  52. ; main sprite JSL
  53. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  54.  
  55. print "MAIN ",pc
  56. PHB ; \
  57. PHK ; | main sprite function, just calls local subroutine
  58. PLB ; |
  59. JSR Main ; |
  60. PLB ; |
  61. RTL ; /
  62.  
  63.  
  64. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  65. ; main sprite routine
  66. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  67.  
  68. Main:
  69. LDA !RAM_SpritesLocked
  70. BNE .Return
  71.  
  72. LDY !RAM_BigBooIndex,x
  73. LDA.w !RAM_SpriteState,y
  74. CMP #$01
  75. BEQ .Active
  76. CMP #$02
  77. BEQ .Active
  78. LDA #$FF
  79. STA !RAM_ActivityFlag
  80. BRA .Return
  81.  
  82. .Active
  83. LDA !RAM_BigBooHP,y
  84. STA !RAM_ActivityFlag
  85.  
  86. .Return
  87. RTS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement