Advertisement
Guest User

Untitled

a guest
Aug 26th, 2019
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.27 KB | None | 0 0
  1. ; original code (and comments) by Sonikku
  2. ; restored and modified by Ladida
  3.  
  4. !NormIdle = $00 ; standing still, no item
  5. !CarrIdle = $07 ; standing still, holding item
  6. !NormLookUp = $03 ; standing still, no item
  7. !CarrLookUp = $11 ; standing still, holding item
  8. !frames = 8 ; how many frames of animation
  9. ;dont forget to expand/shrink the .Walking
  10. ;table at the bottom if this is changed
  11.  
  12. !dp = $0000
  13. !addr = $0000
  14. !sa1 = 0
  15. !gsu = 0
  16.  
  17. if read1($00FFD6) == $15
  18. sfxrom
  19. !dp = $6000
  20. !addr = !dp
  21. !gsu = 1
  22. elseif read1($00FFD5) == $23
  23. sa1rom
  24. !dp = $3000
  25. !addr = $6000
  26. !sa1 = 1
  27. endif
  28.  
  29. org $00CFF0
  30. NOP
  31. LDA.b #!frames-1
  32.  
  33. org $00D00A
  34. autoclean JML WalkingFrame
  35.  
  36. freecode
  37. WalkingFrame:
  38. TAX ; transfer a to x so i can actually index it
  39. LDA $148F|!addr ; IT JUST MAKES NO SENSE WHY IS THERE 2 CARRYING FLAGS
  40. BEQ .nocarry ; SO GO AWAY IF MARIO ISN'T CARRYING SOMETHING
  41. LDA $7B ; also if he is not moving then that's A-okay
  42. BNE + ; but if he is then he should be showing frameblblblbll
  43. LDA $15
  44. AND #$08
  45. BEQ +++
  46. LDA #!CarrLookUp
  47. BRA ++
  48. +++
  49. LDA #!CarrIdle ; carrying something idle frame
  50. BRA ++ ; GO DO THINGS
  51. +
  52. TXA ; transfer x to a
  53. CLC ; so i can increase the
  54. ADC.b #!frames*2 ; table thingy
  55. BRA .dothings ; aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  56. .nocarry
  57. LDA $14A0|!addr ; if mario shouldn't be showing running frames
  58. CMP #$10 ; (although can be any value below #$10)
  59. ORA $13E4|!addr ; or is not running
  60. CMP #$70 ; AT THE MAXIMUM CAPACITY
  61. BCC + ; then go away
  62. TXA ; transfer x to a
  63. CLC ; so i can increase the
  64. ADC.b #!frames ; table thingy
  65. .dothings
  66. TAX ; to 8 more values
  67. BRA .normrun ; so it indexes the running frames
  68. +
  69. LDA $7B ; if moving
  70. BNE .normrun ; he is fucking moving god damn
  71. LDA $15
  72. AND #$08
  73. BEQ +
  74. LDA #!NormLookUp
  75. BRA ++
  76. +
  77. LDA #!NormIdle ; idle image; can be edited to allow an idle animation entirely
  78. BRA ++ ; then go run original code lmao
  79. .normrun
  80. LDA.l .Walking,x ; HOLY FUCK GET IN THE CAR WE ARE LOADING A /TABLE/
  81. ++
  82. JML $00D030 ; lets GO BACK TO SUPER MARIO WORLD
  83.  
  84. .Walking
  85. db $01,$34,$20,$33,$02,$33,$20,$34 ; walking
  86. db $01,$01,$20,$20,$02,$02,$20,$20 ; running
  87. db $27,$23,$22,$1E,$08,$1E,$22,$22 ; carrying something 27 14 08
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement