Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; original code (and comments) by Sonikku
- ; restored and modified by Ladida
- !NormIdle = $00 ; standing still, no item
- !CarrIdle = $07 ; standing still, holding item
- !NormLookUp = $03 ; standing still, no item
- !CarrLookUp = $11 ; standing still, holding item
- !frames = 8 ; how many frames of animation
- ;dont forget to expand/shrink the .Walking
- ;table at the bottom if this is changed
- !dp = $0000
- !addr = $0000
- !sa1 = 0
- !gsu = 0
- if read1($00FFD6) == $15
- sfxrom
- !dp = $6000
- !addr = !dp
- !gsu = 1
- elseif read1($00FFD5) == $23
- sa1rom
- !dp = $3000
- !addr = $6000
- !sa1 = 1
- endif
- org $00CFF0
- NOP
- LDA.b #!frames-1
- org $00D00A
- autoclean JML WalkingFrame
- freecode
- WalkingFrame:
- TAX ; transfer a to x so i can actually index it
- LDA $148F|!addr ; IT JUST MAKES NO SENSE WHY IS THERE 2 CARRYING FLAGS
- BEQ .nocarry ; SO GO AWAY IF MARIO ISN'T CARRYING SOMETHING
- LDA $7B ; also if he is not moving then that's A-okay
- BNE + ; but if he is then he should be showing frameblblblbll
- LDA $15
- AND #$08
- BEQ +++
- LDA #!CarrLookUp
- BRA ++
- +++
- LDA #!CarrIdle ; carrying something idle frame
- BRA ++ ; GO DO THINGS
- +
- TXA ; transfer x to a
- CLC ; so i can increase the
- ADC.b #!frames*2 ; table thingy
- BRA .dothings ; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- .nocarry
- LDA $14A0|!addr ; if mario shouldn't be showing running frames
- CMP #$10 ; (although can be any value below #$10)
- ORA $13E4|!addr ; or is not running
- CMP #$70 ; AT THE MAXIMUM CAPACITY
- BCC + ; then go away
- TXA ; transfer x to a
- CLC ; so i can increase the
- ADC.b #!frames ; table thingy
- .dothings
- TAX ; to 8 more values
- BRA .normrun ; so it indexes the running frames
- +
- LDA $7B ; if moving
- BNE .normrun ; he is fucking moving god damn
- LDA $15
- AND #$08
- BEQ +
- LDA #!NormLookUp
- BRA ++
- +
- LDA #!NormIdle ; idle image; can be edited to allow an idle animation entirely
- BRA ++ ; then go run original code lmao
- .normrun
- LDA.l .Walking,x ; HOLY FUCK GET IN THE CAR WE ARE LOADING A /TABLE/
- ++
- JML $00D030 ; lets GO BACK TO SUPER MARIO WORLD
- .Walking
- db $01,$34,$20,$33,$02,$33,$20,$34 ; walking
- db $01,$01,$20,$20,$02,$02,$20,$20 ; running
- db $27,$23,$22,$1E,$08,$1E,$22,$22 ; carrying something 27 14 08
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement