Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;Sprite Morph v2
- ;;By Erik557
- ;;Description: Turns a sprite into another one.
- ;;It has configurable settings.
- ;;No credit needed.
- ;;NOTE: Needs NMSTL
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- !MorphType = 0 ;Explained below
- ;If morph type is 0:
- !SpriteType = 0 ;0 = Normal; 1 = Custom
- ;
- ;If morph type is 1:
- ;0 = Normal to custom; 1 = Custom to normal
- !SprNum = $0A ;Sprite number
- !SprMorph = $15 ;Morph Result
- !Sound = $10 ;SFX
- !SFXBank = $1DF9 ;SFX Bank
- ;Don't touch these.
- if !SpriteType == 1
- !Status = $3242
- !SprRAM = $400083
- !Extra = $400040
- else
- !Status = $3242
- !SprRAM = $3200
- !Extra = $400040
- endif
- db $42
- JMP Ret : JMP Ret : JMP Ret : JMP SpriteV : JMP SpriteH : JMP Ret : JMP Ret : JMP Ret : JMP Ret : JMP Ret
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- SpriteH:
- SpriteV:
- LDA !SprRAM,x
- CMP #!SprNum
- BNE Ret
- LDA !Extra,x
- AND #$08
- if !SpriteType == 1
- BEQ Ret
- else
- BNE Ret
- endif
- STZ !Status,x
- LDA #!SprMorph
- if !MorphType == 1
- if !SpriteType == 1
- CLC
- else
- SEC
- endif
- else
- if !SpriteType == 1
- SEC
- else
- CLC
- endif
- endif
- %spawn_sprite()
- %create_smoke()
- %move_spawn_to_sprite()
- LDA #!Sound
- STA !SFXBank
- Ret:
- RTL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement