diff --git a/th01/main/boss/b20m.cpp b/th01/main/boss/b20m.cpp index 4532704f..a2373340 100644 --- a/th01/main/boss/b20m.cpp +++ b/th01/main/boss/b20m.cpp @@ -1740,3 +1740,18 @@ void near shake_for_50_frames(void) boss_phase_frame = 0; } } + +void near pattern_rain_from_top(void) +{ + if((boss_phase_frame % 8) != 0) { + return; + } + screen_x_t left = (PLAYFIELD_LEFT + playfield_rand_x()); + vram_y_t top = PLAYFIELD_TOP; + pellet_group_t group; + + select_for_rank( + reinterpret_cast(group), PG_1, PG_1, PG_1, PG_1_RANDOM_WIDE + ); + Pellets.add_group(left, top, group, to_sp(2.75f)); +} diff --git a/th01_reiiden.asm b/th01_reiiden.asm index 24982933..3f69b29b 100644 --- a/th01_reiiden.asm +++ b/th01_reiiden.asm @@ -22446,6 +22446,7 @@ main_36_TEXT segment byte public 'CODE' use16 @particles2x2_wavy_unput_update_r$qv procdesc near @pattern_four_aimed_lasers$qv procdesc near @shake_for_50_frames$qv procdesc near + @pattern_rain_from_top$qv procdesc near main_36_TEXT ends main_36__TEXT segment byte public 'CODE' use16 @@ -22457,44 +22458,6 @@ include th01/main/boss/anim.inc sariel_shield equ -; =============== S U B R O U T I N E ======================================= - -; Attributes: bp-based frame - -sub_2A8F7 proc near - -@@group = word ptr -6 -@@top = word ptr -4 -@@left = word ptr -2 - - enter 6, 0 - mov ax, _boss_phase_frame - mov bx, 8 - cwd - idiv bx - or dx, dx - jnz short locret_2A947 - call IRand - mov bx, PLAYFIELD_RIGHT - cwd - idiv bx - mov [bp+@@left], dx - mov [bp+@@top], PLAYFIELD_TOP - push PG_1 or (PG_1_RANDOM_WIDE shl 16) ; (for_hard) or (for_lunatic) - push PG_1 or (PG_1 shl 16) ; (for_easy) or (for_normal) - push ss ; ret (segment) - lea ax, [bp+@@group] - push ax ; ret (offset) - call @sariel_select_for_rank$qmiiiii - call @CPellets@add_group$qii14pellet_group_ti stdcall, offset _Pellets, ds, [bp+@@left], [bp+@@top], [bp+@@group], (2 shl 4) + 12 - add sp, 18h - -locret_2A947: - leave - retn -sub_2A8F7 endp - - ; =============== S U B R O U T I N E ======================================= ; Attributes: bp-based frame @@ -25313,7 +25276,7 @@ loc_2C624: loc_2C62B: call @pattern_four_aimed_lasers$qv - call sub_2A8F7 + call @pattern_rain_from_top$qv loc_2C631: cmp _boss_phase_frame, 0