Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- LDY #$E0 ;\ Load $E0 to Y
- BIT $0D9B ;| Check bits but do not store
- BVC Sprite_Routine ;/ If overflow flag clear, skip code
- LDY #$00 ;\ Load $00 to Y
- LDA $0D9B ;| Load fight mode value
- CMP #$C1 ;| and compare with $C1 (bowser battle)
- BEQ Sprite_Routine ;/ If equal, skip code
- LDA #$F0 ;\ Y-position of item
- STA $0201,Y ;/ is stored here then
- Sprite_Routine:
- STY $01 ;\ Store previous value from Y here
- LDY $0DC2 ;| Load reserved item into Y
- BEQ Sprite_Return ;/ If empty, return
- LDA $8E01,Y ;\ Get data from table
- STA $00 ;| and store here
- CPY #$03 ;| Compare Y with $03
- BNE Draw_Sprite ;/ If not equal, skip code
- LDA $13 ;\ Frame counter
- LSR ;| Divide by 2
- AND #$03 ;| AND #$03
- PHY ;| Push Y
- TAY ;| Transfer A to Y
- LDA $8DFE,Y ;| Get data from table
- PLY ;| Pull Y
- STA $00 ;/ Store here
- Draw_Sprite:
- LDY $01 ;\ Load previous Y value again
- LDA #$78 ;| X-position of item
- STA $0200,Y ;/ is stored here
- LDA $1BE3 ;\ Load layer 3 tilemap value
- BNE Boss_Item ;/ If not equal, status bar is on top
- LDA $0D9B ;\ Load fight mode value
- BNE Boss_Item ;/ If not equal, item is on top
- LDA #$C7 ;\ Y-position of item
- STA $0201,Y ;| is stored here
- BRA Store_Item ;/ Continue code
- Boss_Item:
- LDA #$0F ;\ Y-position of item
- STA $0201,Y ;/ is stored here
- Store_Item:
- LDA #$30 ;\ Get properties
- ORA $00 ;| and settings from before
- STA $0203,Y ;/ and store here
- LDX $0DC2 ;| Reserved item into X
- LDA $8DF9,X ;| Tilemap from table
- STA $0202,Y ;| is stored here
- TYA ;| Transfer Y to A
- LSR ;| Divide by 2
- LSR ;| Divide by 4
- TAY ;| Transfer A to Y
- LDA #$02 ;| Sprite tilemap
- STA $0420,Y ;/ stuff (8x8 / 16x16)
- Sprite_Return:
- RTL ;| Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement