This is a patch that adds a few ASM hacks to the game.
The main goal of this patch is to include a brand new SMB2-style sprite carrying mechanic. While Mario is holding a sprite in this fashion, he does not need to hold the button down and can simply press the button again when he wishes to throw or drop it. He is also unable to throw the sprite directly up in this case, to make it more similar to SMB2.
There is a setting if you wish to enable this behavior at all times.
There is another setting if you wish for for the patch to enforce the classic SMW-style carrying controls -- where you must keep the button held down to continue holding an item, and release the button to throw/drop it. In this case, you can also throw the carried sprite directly up.
For developers that utilize this patch:
1. $148F now contains the sprite index of the currently-carried sprite, plus one.
2. When the highest bit of $148F is set (setting it to #$80 or higher), the player holds the sprite SMB2-style.
Included is a modified Mega Mole custom sprite which can be inserted with PIXI. This sprite allows Mario to pick up the sprite, triggering the SMB2 carrying function.
As an added bonus, a few changes to Mario's animation routines (to provide an alternate set of animation frames to use when SMB2-carrying) allow you to remap several of Mario's default frames, such as the walking/running/carrying/wall-running animations. You are also able to modify what frames are displayed when looking up or crouching, as well as jumping and turning around.
As an FYI:
1. This patch does not provide support for SMW's default sprites to be carriable in the SMB2-style (without setting the behavior globally, of course) -- this would need to be patched in locally, but the option may be implemented at a later point in time.
2. This patch does not remap any of Mario's animation frames, and includes "SMM2-Carrying.bin" for reference purposes only. You must remap Mario's graphics manually by replacing unnecessary frames of animation, or utilize a patch that expands the maximum number of frames Mario can use. The preview GIF utilizes my own remapping, which replaces three of the Castle Destruction Sequence frames.
- 8/8/2020 - Initial public v0.15 release
There were a few issues which have now been fixed.
- Somehow, the !bank defines in the SA-1 remap file got swapped between LoROM and SA-1, which caused SA-1 to break in most situations (for some reason, it didn't break when specifically using bsnes and a 2MB SA-1 ROM). There were also a few missing conversions in the patch, one being a sprite table define and the others being missing !dp defines when using absolute addressing on direct page addresses.
- The slot index in $1470/$148F could be set wrong when carrying a sprite through a pipe. A sprite has its slot moved to 0 when brought through a pipe, which caused a discrepancy between the slot number in $1470 and the actual slot number when calculating the index to store. The bug self-corrected if you dropped the sprite then picked it up again so it wasn't a huge deal, but was easy enough to fix.
Everything else appears to work as intended, so, accepted. It's nice to have an alternative carrying mechanic, and in some ways it feels more intuitive than the vanilla SMW carrying system. However, as the description mentions, if you want to use it "out of the box" then you'll need to apply it globally with the !AlwaysSMB2Carry define - otherwise you'll have to whip up a patch that enables it for specific sprites, or use a custom sprite. It would be nice if future carryable custom sprites are made to work with this patch. Also, the slot index feature of $148F is most useful when utilized by other ASM; it has no effect on gameplay on its own.
Added LoROM and SA-1 tags.
A few extra notes that weren't mentioned in the description:
- This patch disables pipe-carrying for the vanilla carrying system, and when !HeldSpriteType = !false. SMB2-carried sprites can be brought through a pipe when using the "tap to throw" mechanic, but will be dropped upon entering a pipe otherwise.
- Bit 7 of $1470/$148F (the "SMB2 carry" flag) will not be reset when carrying a sprite into water, even though swimming automatically disables the SMB2 carry.