Advertisement
Erik557

Untitled

Jun 4th, 2016
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; this will install a custom sprite in sprite slot 36, you can make it support other null slots though.
  2. ; for the tweaker shit, you know the drill. set it as in the .cfg
  3. ; you can even replace normal sprites with this method, not sure why would u tho.
  4.  
  5. ;step 1: use freespace IN BANK 1 to setup a handler
  6.  
  7. org $01E2B0
  8. ;init handler
  9. InitCustom:
  10.     JSL InitHandler
  11.     RTS
  12.    
  13. MainCustom:
  14.     autoclean JSL MainHandler
  15.     RTS
  16.    
  17. ;step 2: point to the handlers
  18. org $0181E9
  19.     dw InitCustom
  20. org $018638
  21.     dw MainCustom
  22.    
  23. freecode
  24. InitHandler:
  25.     PHB
  26.     PHK
  27.     PLB
  28.     LDA $9E,x
  29.     CMP #$36
  30.     BNE +
  31.     JSR InitVenus
  32. +   PLB
  33.     RTL
  34.  
  35. MainHandler:
  36.     PHB
  37.     PHK
  38.     PLB
  39.     LDA $9E,x
  40.     CMP #$36
  41.     BNE +
  42.     JSR MainVenus
  43. +   PLB
  44. RTL
  45.  
  46. InitVenus:
  47. ;init code of the sprite goes here
  48.  
  49. MainVenus:
  50. ;main code of the sprite goes here
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement