Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;; Display Level Message DX, by yoshicookiezeus
- ;;
- ;; Based off Dispari Scuro's NPCv3.0 sprite and the disassembly of the "Display Level Message 1" sprite from all.log
- ;;
- ;; The below description is also from the NPC sprite.
- ;;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ; sprite constants - feel free to change these
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ; ROM and RAM defines - don't mess with these
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- !RAM_SpritesLocked = $9D
- !RAM_SpriteNum = $9E
- !RAM_SpriteState = $C2
- !RAM_SpriteStatus = $14C8
- !RAM_BigBooIndex = $1504
- !RAM_BigBooHP = $1534
- !RAM_ActivityFlag = $58
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ; init JSL
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- print "INIT ",pc
- LDA #$FF
- STA !RAM_ActivityFlag
- LDY #$09
- Init_LoopStart:
- LDA.w !RAM_SpriteNum,y
- CMP #$C5
- BEQ Init_Found
- DEY
- BPL Init_LoopStart
- RTL
- Init_Found:
- TYA
- STA !RAM_BigBooIndex,x
- RTL
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ; main sprite JSL
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- print "MAIN ",pc
- PHB ; \
- PHK ; | main sprite function, just calls local subroutine
- PLB ; |
- JSR Main ; |
- PLB ; |
- RTL ; /
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ; main sprite routine
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- Main:
- LDA !RAM_SpritesLocked
- BNE .Return
- LDY !RAM_BigBooIndex,x
- LDA.w !RAM_SpriteState,y
- CMP #$01
- BEQ .Active
- CMP #$02
- BEQ .Active
- LDA #$FF
- STA !RAM_ActivityFlag
- BRA .Return
- .Active
- LDA !RAM_BigBooHP,y
- STA !RAM_ActivityFlag
- .Return
- RTS
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement