Advertisement
SeedBorn

Frog HP with SRM

Dec 22nd, 2019
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. The frog actor (ID 0022) has its draw function at instance + 13C, which normally points to overlay + 15A4. Overlay + FC4 is the function for the frog giving you the HP. We can conveniently use the angle of a held actor with srm to overwrite the two least significant bytes of the draw function pointer, so in most circumstances that will be sufficient to make it point at overlay + FC4. Overlay + FC0 works as well since the function is preceded by a nop.
  2.  
  3. For held actors, angle is written to instance + BE, so we need the held actor pointer to be at Frog Instance + 80 to write to the pointer. Note: the other 4 frogs are still allocated even when they're not there, but this pointer is null for them (and changing it seems to softlock). The held item's position writes to, according to Cloudmodding "/* 0xA4 */ Coord_f displacement; //amount to correct velocity (0x5C) by when colliding into a body." What this will do is send the frog flying off into space if you stand around for a long enough. Luckily if you drop your held item right after loading the main room, so long as the frog is somewhere nearby it will give you the heart (and this will make it tend towards your direction, fortunately). (The frog stops moving once you drop the held actor.)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement