Allows the player to use L/R to spawn a sprite, normal or custom, in a carried state in Mario's hands. This code also allows for each of the shoulder buttons to spawn a different sprite.
Includes checks so sprites won't spawn when they shouldn't, such as when something's already being carried.
Screenshots:
There is a flaw with this UberASM code: It doesn't spawn custom sprites properly. And there is a rather obvious reason for that:
Code
LDA $00|!dp,y ;\
STA !7FAB9E,x ;/set custom sprite #
JSL $0187A7|!bank ;clear custom sprite stuff
+
JSL $07F7D2|!bank ;clear regular sprite stuff
LDA #$09
STA !14C8,x ;sprite is in carried state
You didn't consider that $07F7D2 will clear out the custom sprite flag as any sprite which would spawn also would have been a custom sprite, not to mention all the tweaker bytes set for the custom sprite would have been overwritten by $07F7D2. As a result, you can only spawn a carried sprite with the same number as the custom sprite's acts like.
While we're at the removal of your patch: You can spawn a sprite while you're flying with a cape. Just noting since this does have some potential for jank so you could make it at least toggleable.
Follow Us On