News:

Don't forget to visit the main site! There's lots of helpful docs, patches, and more!

Main Menu

Spore Spawn "Possessing" the shutter PLM

Started by RealRed, October 02, 2014, 11:51:41 AM

Previous topic - Next topic

RealRed

Alright, so I definitely wasn't expecting this one.
If I put a shutter in the same room as Spore Spawn, Spore Spawn will "drag" the graphics for the shutter bar around the room with him. Furthermore the gate remains offset by about -4, +4 even after he's dead.
Is there any way I could stop this from happening? ... What *is* happening, anyway?

FullOfFail

Found that out too by accidently using the wrong PLM pointer:

[spoiler][/spoiler]

Not sure why.

Scyzer

It happens because the gates and Spore Spawn both use a 'projectile' of sorts. The actual gate part is a projectile, and all of Spore's other bits are projectiles (his stem blocks, the droppers, and the spores).
The PLM setup routine runs first, so the first projectile slot is taken up by the gate, then the rest are filled by Spore Spawn. SS is hardcoded to move only the first 4 projectiles relative to his position; there is no adjustment for what slots his stem sections are actually in, so he moves the gate as well, thinking it's a part of his stem.

The fix is simple though.
Start at $A5EC49, and locate the next 16 (decimal) bytes of $8D. The byte immediately following this $8D will be one of $67, $69, $6A, $6B, $AF, $B1, $B3, $B5. You need to subtract $02 from each of these bytes only ($67 would become $65, $B1 becomes $AF, etc). Remember there are only 16 changes to make, spread out over a couple hundred bytes (just use Ctrl F). Don't change the $8D.

This fix only works if you have just one PLM in the room which uses a projectile. If you have 2 gates, then you need to subtract 2 again from those bytes. If you remove a gate after, you'll need to add 2 back.

RealRed

Awesome. Works perfectly, although... I only found 15 of the bytes? There don't seem to be any problems though.
Thanks Scyzer, you fix everything.
... I sure hope Nintendo never decides "You know too much".

Scyzer

#4
Locations of each $8D in bank $A5 are:
$EC65, $EC6F, $EC7D, $EC8B, $ECA2, $ECAC, $ECBA, $ECC8
$ECEF, $ECF9, $ED07, $ED15, $ED2C, $ED36, $ED44, $ED52

Missing one of the addresses could result in one of the pieces of stem being misaligned, or the gate moving around still, depending which one you missed.

If it helps, there's a pattern with the values. In order, the values are normally $67, $69, $6B, $6D, $67, $69, $6B, $6D, $AF, $B1, $B3, $B5, $AF, $B1, $B3, $B5.