Skip to content

Commit

Permalink
[Anniversary] [th01] Sariel: Restore the full spawn cross animation
Browse files Browse the repository at this point in the history
Part of P0234, funded by Ember2528.
  • Loading branch information
nmlgc committed Mar 5, 2023
1 parent 4504d90 commit 77792bf
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions th01/main/boss/b20m.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1076,25 +1076,15 @@ void near pattern_birds_on_ellipse_arc(void)
spawner_left.v += spawner_velocity_x.v;
spawner_top.v += spawner_velocity_y.v;

// ZUN bug: ZUN suddenly forgot that [spawner] uses subpixels, not
// pixels. Comparing its position to the pixel equivalent of
// ((RES_X - SPAWNCROSS_W), (RES_Y - SPAWNCROSS_H))
// effectively clips the top-left coordinate of the spawner to a
// screen-space rectangle from (0, 0) to (38, 23). Since that's
// quite far from its actual position, the code below never gets
// executed.
if(overlap_xy_lrtb_le_ge(
spawner_left, spawner_top,
0, 0,
(RES_X - SPAWNCROSS_W), // should be subpixels
(RES_Y - SPAWNCROSS_H) // should be subpixels
to_sp(RES_X - SPAWNCROSS_W),
to_sp(RES_Y - SPAWNCROSS_H)
)) {
// ZUN bug: Also, here. Quite ironic given that there's a
// correct version of this blitting call above… Copy-pasta
// confirmed.
grc_put_8(
spawner_left, // should be pixels
spawner_top, // should be pixels
spawner_left.to_pixel(), // should be pixels
spawner_top.to_pixel(), // should be pixels
GRC_SLOT_SPAWNCROSS,
(boss_phase_frame % SPAWNCROSS_CELS),
((boss_phase_frame % 4) + 2)
Expand Down

0 comments on commit 77792bf

Please sign in to comment.