Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- !explodeTime = $FF ; frames until the bob-omb explodes
- !xSpeed = $10 ; x speed to give the spawned bob-omb
- !shootTime = $FF ; frames between firing
- !xOff = $04 ; x offset from the shooter to spawn the bomb
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- print "INIT ",pc
- LDA #!shootTime
- STA $1540,x
- RTL
- print "MAIN ",pc
- PHB
- PHK
- PLB
- JSR Main
- PLB
- RTL
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- xOffs:
- db !xOff, $100-!xOff
- db $00,$FF
- Main:
- LDA $1540,x
- BNE Return
- LDA #!shootTime
- STA $1540,x
- JSR SubHorzPos
- LDA xOffs,y
- STA $00
- LDA xOffs+2,y
- STA $01
- LDA $186C,x
- BNE Return
- JSL $02A9DE
- BMI Return
- LDA #$09
- STA $14C8,y
- LDA #!SpriteNumber
- STA $009E,y
- LDA $E4,x
- CLC
- ADC $00
- STA $00E4,y
- LDA $14E0,x
- CLC
- ADC $01
- STA $14E0,y
- LDA $D8,x
- STA $00D8,y
- LDA $14D4,x
- STA $14D4,y
- PHX
- TYX
- JSL $07F7D2
- LDA #!explodeTime
- STA $1540,x
- LDA #!xSpeed
- STA $B6,x
- PLX
- Return:
- RTS
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- SubHorzPos:
- LDY.b #$00
- LDA $D1
- SEC
- SBC $E4,X
- STA $0F
- LDA $D2
- SBC.w $14E0,X
- BPL +
- INY
- +
- RTS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement