This patch reduces the width of the "static camera region" (the range where the screen doesn't scroll left or right by the player) to a single pixel, removes the auto "look ahead" feature in smw and makes the screen always centered with the player (ignoring L/R scrolling, but still has the reduced "static camera region").
Update: Added a newer version (with the old version in case you want it) that makes the screen tightly follow Mario vertically (the vertical scroll area is also reduced to a single line) when you set the vertical scroll to "vertical scroll at will". This is more ASM-flexible. See readme for details. And also allow the bottom 16x16 row to be seen (both).
Another update: Also include a non-instant-scroll to prevent player-warp glitches.
CenterScrollAdvanced.asm:47: error: Assertion failed: Save at least one level in lunar magic! [assert read1($00F6E4) == $5C,"Save at least one level in lunar magic!"]
CenterScrollAdvanced.asm:70: error: SNES address $8D000C doesn't map to ROM [nop #6]
? I have saved a level in lunar magic and have free ram in that area... Any help?
Can this patch be used on a per-level basis? Perhaps with UberASM? I have a level that requires vertical scroll at will, and with vanilla camera effects works great, but with this patch because the camera follows mario, some sprites get despawned when they go off screen.
EDIT: Or perhaps if possible have the effects of this patch be incorporated into a block that activates the centered camera for the duration of the level, then reverts back when the level finishes or when a 'revert camera' block is touched.
Edit 2: Scratch all that, you just need to put this in the code:
db $D0 ;>Update lowest Layer 2 Y position on loading levels
In the bit inside the InitScrollPos label, the DEC instruction has to be replaced with the instruction to increment the accumulator by $0F instead, this is most noticeable when using Layer 2 V-Scroll: Constant.
I tried to use
but it just didn’t work for some odd reason, whereas 15 INC instructions did.
Edit: This only has to be done when BG v-scroll start is C0, because the equivalent FG v-scroll is CF.
A lot of unoptimized code:
- You don't need to switch the data bank in the Advanced version, it'll be faster to do LDA.l label,x since you're only accessing one table in total.
- You don't need PHP/PLP in such small code range. Not only that, the code that requires the original processor flags is restored right at the before you even push.
Fun fact: readmes are supposed to be user friendly, not a wall of unrelated text that average user: a) Doesn't understand; b) Doesn't care about. If the moderator, which knows about these things, has problems understanding what it goes on about, don't you think it's a good indication to start either shortening them or at least including a separate quick guide?
But neither of those I ound removal worthy, and it works, so approved. I don't really like this kind of scrolling personally but some do.