Thursday, August 10, 2017

Play as Failure Cresh in (almost) every level

What if you want to play as Failure Cresh, but can't find an object that kills you while you're in object placement mode? Don't worry, there's another way. Provided you haven't yet collected all the Chaos Emeralds, all you have to do is jump inside a big ring, and then enter object placement mode before you're taken to the Special Stage.


When the animation ends, the ring object saves a bunch of information about the player's current state to a safe area in RAM. This information is then recalled at the end of the Special Stage, in order to restore the player to more or less the same state as when the game was interrupted.
Save_Level_Data2:
    move.b  (Last_star_post_hit).w,(Saved2_last_star_post_hit).w
    move.w  (Current_zone_and_act).w,(Saved2_zone_and_act).w
    move.w  (Apparent_zone_and_act).w,(Saved2_apparent_zone_and_act).w
    move.w  x_pos(a0),(Saved2_X_pos).w
    move.w  y_pos(a0),(Saved2_Y_pos).w
    move.w  (Player_1+art_tile).w,(Saved2_art_tile).w
    move.w  (Player_1+top_solid_bit).w,(Saved2_solid_bits).w
    move.w  (Ring_count).w,(Saved2_ring_count).w
    move.b  (Extra_life_flags).w,(Saved2_extra_life_flags).w
    move.l  (Timer).w,(Saved2_timer).w
    move.b  (Dynamic_resize_routine).w,(Saved2_dynamic_resize_routine).w
    move.w  (Camera_max_Y_pos).w,(Saved2_camera_max_Y_pos).w
    move.w  (Camera_X_pos).w,(Saved2_camera_X_pos).w
    move.w  (Camera_Y_pos).w,(Saved2_camera_Y_pos).w
    move.w  (Mean_water_level).w,(Saved2_mean_water_level).w
    move.b  (Water_full_screen_flag).w,(Saved2_water_full_screen_flag).w
    move.b  (Player_1+status_secondary).w,(Saved2_status_secondary).w
    rts
One of the backed up addresses is the player's art tile, for the same reason as before: so that the player respawns with the priority they originally had when they entered the ring.

What if the level you're in doesn't have any big rings? Well, you could use star posts, which perform a similar operation using the Save_Level_Data function... except the function gets called right when you touch the star post, and you can't touch star posts in object placement mode.

However! There's a special kind of star post which activates on its own: the fake star post. That'll be the subject of the next post. Watch out for those Mania spoilers, guys.

No comments:

Post a Comment