Advertisement
Guest User

f

a guest
Oct 31st, 2014
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.87 KB | None | 0 0
  1. ;; Sand Block. By ICB. Make act like Block 25
  2.  
  3. db $42
  4. JMP MarioBelow : JMP MarioAbove : JMP MarioSide
  5. JMP SpriteV : JMP SpriteH : JMP MarioCape : JMP MarioFireball
  6. JMP TopCorner : JMP BodyInside : JMP HeadInside
  7.  
  8. MarioAbove:
  9. LDY #$01 ;act like tile 130
  10. LDA #$30 ;If standing on top
  11. STA $1693
  12. LDA $16 ;If button
  13. AND #$40 ;Y or X isn't pressed
  14. BEQ RETURN2 ;return
  15. LDA #$E4 ;Move Mario up
  16. STA $7D ;for a second
  17. STZ $7B ;Zero horz speed
  18. LDA #$0A ;Show ducking while picking up
  19. STA $1498 ;item pose
  20. LDA #$06 ;play sound
  21. STA $1DF9
  22.  
  23. LDA #$02 ;Generate
  24. STA $9C ;A
  25. JSL $00BEB0 ;blank block
  26. JSR SUB_SMOKE ;make smoke (er...sand)
  27. RETURN2:
  28. RTL
  29.  
  30. SpriteV:
  31. LDY #$01 ;act like tile 130
  32. LDA #$30 ;to sprites
  33. STA $1693 ;that are walking on top
  34. MarioSide:
  35. MarioBelow:
  36. SpriteH:
  37. MarioCape:
  38. MarioFireBall:
  39. RTL
  40. SUB_SMOKE:
  41. PHP
  42. SEP #$20
  43. LDY #$03 ; \ find a free slot to display effect
  44. FINDFREE:
  45. LDA $17C0,y ; |
  46. BEQ FOUNDONE ; |
  47. DEY ; |
  48. BPL FINDFREE ; |
  49. PLP
  50. RTS ; / return if no slots open
  51.  
  52. FOUNDONE:
  53. LDA #$01 ; \ set effect graphic to smoke graphic
  54. STA $17C0,y ; /
  55. LDA $98 ; \ smoke y position = generator y position
  56. AND #$F0
  57. SEC
  58. SBC #$10
  59. STA $17C4,y ; /
  60.  
  61. LDA #$15 ; \ set time to show smoke
  62. STA $17CC,y ; /
  63. LDA $9A ; \ load generator x position and store it for later
  64. AND #$F0
  65. STA $17C8,y ; /
  66. LDX $15E9
  67. PLP
  68. RTS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement