@@ -82,41 +82,6 @@ class CShootoutLaser {
8282
8383 // Directly sets [done] if the laser collides with the player.
8484 void update_hittest_and_render (void );
85-
86- // Tries to unblit the entire laser, but fails hilariously and potentially
87- // even crashes the game.
88- void unput_and_reset (void ) {
89- if (alive) {
90- // ZUN bug: And even two of them:
91- //
92- // 1) Surely this should have unblitted from the start to the end
93- // of the ray instead? Except that this class doesn't explicitly
94- // store that end point… so the best alternative would be the
95- // target point. But given that we use our own blitting routine,
96- // who knows how accurate that actually is?
97- //
98- // 2) graph_r_line_unput() takes screen_x_t and vram_y_t, not
99- // LaserPixels truncated to 16-bits. :zunpet: The function then
100- // interpolates and clips these values in a rather clumsy
101- // attempt to find a line segment between those garbage
102- // coordinates that actually falls within the boundaries of
103- // VRAM. At best, this search fails, and the function simply
104- // does nothing. At worst, the resulting line triggers the ZUN
105- // bugs in graph_r_line_unput(), raising a General Protection
106- // Fault.
107- // The latter is exactly the cause behind potential crashes when
108- // defeating bosses while there are diagonally moving lasers on
109- // screen, which are most commonly reported for Elis and Mima.
110- //
111- // So yeah, not doing anything would have been the much better
112- // choice.
113- graph_r_line_unput (
114- ray_start_left.v , ray_start_y.v , origin_left.v , origin_y.v
115- );
116-
117- alive = false ;
118- }
119- }
12085};
12186
12287extern CShootoutLaser shootout_lasers[SHOOTOUT_LASER_COUNT ];
@@ -125,8 +90,6 @@ extern CShootoutLaser shootout_lasers[SHOOTOUT_LASER_COUNT];
12590#define shootout_laser_safe (i ) \
12691 shootout_lasers[(i) % SHOOTOUT_LASER_COUNT ]
12792
128- #define shootout_lasers_unput_and_reset_broken (i, count ) { \
129- for (i = 0 ; i < count; i++) { \
130- shootout_lasers[i].unput_and_reset (); \
131- } \
132- }
93+ // Resets all lasers, but leaves them in VRAM. The boss defeat animation is
94+ // supposed to get rid of them.
95+ void shootout_lasers_reset (void );
0 commit comments