Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;; Sand Block. By ICB. Make act like Block 25
- db $42
- JMP MarioBelow : JMP MarioAbove : JMP MarioSide
- JMP SpriteV : JMP SpriteH : JMP MarioCape : JMP MarioFireball
- JMP TopCorner : JMP BodyInside : JMP HeadInside
- MarioAbove:
- LDY #$01 ;act like tile 130
- LDA #$30 ;If standing on top
- STA $1693
- LDA $16 ;If button
- AND #$40 ;Y or X isn't pressed
- BEQ RETURN2 ;return
- LDA #$E4 ;Move Mario up
- STA $7D ;for a second
- STZ $7B ;Zero horz speed
- LDA #$0A ;Show ducking while picking up
- STA $1498 ;item pose
- LDA #$06 ;play sound
- STA $1DF9
- LDA #$02 ;Generate
- STA $9C ;A
- JSL $00BEB0 ;blank block
- JSR SUB_SMOKE ;make smoke (er...sand)
- RETURN2:
- RTL
- SpriteV:
- LDY #$01 ;act like tile 130
- LDA #$30 ;to sprites
- STA $1693 ;that are walking on top
- MarioSide:
- MarioBelow:
- SpriteH:
- MarioCape:
- MarioFireBall:
- RTL
- SUB_SMOKE:
- PHP
- SEP #$20
- LDY #$03 ; \ find a free slot to display effect
- FINDFREE:
- LDA $17C0,y ; |
- BEQ FOUNDONE ; |
- DEY ; |
- BPL FINDFREE ; |
- PLP
- RTS ; / return if no slots open
- FOUNDONE:
- LDA #$01 ; \ set effect graphic to smoke graphic
- STA $17C0,y ; /
- LDA $98 ; \ smoke y position = generator y position
- AND #$F0
- SEC
- SBC #$10
- STA $17C4,y ; /
- LDA #$15 ; \ set time to show smoke
- STA $17CC,y ; /
- LDA $9A ; \ load generator x position and store it for later
- AND #$F0
- STA $17C8,y ; /
- LDX $15E9
- PLP
- RTS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement