mirror of https://github.com/nmlgc/ReC98.git
[Decompilation] [th05] Sara: Pattern 7/9 + 8/9
The one where Sara alternates between firing a slow and a fast spiral of blue ball ring groups that turns clockwise (7) or counter-clockwise (8), with each new bullet accelerating by 0.25 pixels per frame. Part of P0227, funded by nrook.
This commit is contained in:
parent
7aeb5dddd5
commit
271554aad9
|
@ -234,3 +234,33 @@ void near pattern_random_red_rings(void)
|
||||||
snd_se_play(3);
|
snd_se_play(3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define pattern_accelerating_rings(pattern_angle, angle_delta) { \
|
||||||
|
if((boss.phase_frame % 8) == 0) { \
|
||||||
|
bullet_template.spawn_type = BST_NORMAL; \
|
||||||
|
bullet_template.group = BG_RING; \
|
||||||
|
bullet_template.spread = 3; \
|
||||||
|
bullet_template.patnum = PAT_BULLET16_N_BALL_BLUE; \
|
||||||
|
bullet_template.angle = pattern_angle; \
|
||||||
|
bullet_template.speed = state->phase_3.ring_speed; \
|
||||||
|
if((boss.phase_frame % 16) == 0) { \
|
||||||
|
bullet_template.speed.v /= 2; \
|
||||||
|
} \
|
||||||
|
bullet_template_tune(); \
|
||||||
|
bullets_add_regular(); \
|
||||||
|
snd_se_play(3); \
|
||||||
|
\
|
||||||
|
pattern_angle += angle_delta; \
|
||||||
|
state->phase_3.ring_speed.v += to_sp(0.25f); \
|
||||||
|
} \
|
||||||
|
}
|
||||||
|
|
||||||
|
void near pattern_accelerating_spirals_clockwise(void)
|
||||||
|
{
|
||||||
|
pattern_accelerating_rings(state->phase_3.angle_clockwise, +0x06);
|
||||||
|
}
|
||||||
|
|
||||||
|
void near pattern_accelerating_spirals_counterclockwise(void)
|
||||||
|
{
|
||||||
|
pattern_accelerating_rings(state->phase_3.angle_counterclockwise, -0x06);
|
||||||
|
}
|
||||||
|
|
108
th05_main.asm
108
th05_main.asm
|
@ -10262,112 +10262,12 @@ B1_UPDATE_TEXT segment byte public 'CODE' use16
|
||||||
@phase_3_with_pattern$qv procdesc near
|
@phase_3_with_pattern$qv procdesc near
|
||||||
@pattern_pellet_arcs_at_expanding$qv procdesc near
|
@pattern_pellet_arcs_at_expanding$qv procdesc near
|
||||||
@pattern_random_red_rings$qv procdesc near
|
@pattern_random_red_rings$qv procdesc near
|
||||||
|
@pattern_accelerating_spirals_clo$qv procdesc near
|
||||||
|
@pattern_accelerating_spirals_cou$qv procdesc near
|
||||||
B1_UPDATE_TEXT ends
|
B1_UPDATE_TEXT ends
|
||||||
|
|
||||||
B4_UPDATE_TEXT segment byte public 'CODE' use16
|
B4_UPDATE_TEXT segment byte public 'CODE' use16
|
||||||
|
|
||||||
; =============== S U B R O U T I N E =======================================
|
|
||||||
|
|
||||||
; Attributes: bp-based frame
|
|
||||||
|
|
||||||
sub_184BC proc near
|
|
||||||
push bp
|
|
||||||
mov bp, sp
|
|
||||||
mov ax, _boss_phase_frame
|
|
||||||
mov bx, 8
|
|
||||||
cwd
|
|
||||||
idiv bx
|
|
||||||
or dx, dx
|
|
||||||
jnz short loc_18524
|
|
||||||
mov _bullet_template.spawn_type, BST_NORMAL
|
|
||||||
mov _bullet_template.BT_group, BG_RING
|
|
||||||
mov _bullet_template.spread, 3
|
|
||||||
mov _bullet_template.patnum, PAT_BULLET16_N_BLUE
|
|
||||||
mov al, _boss_statebyte[15]
|
|
||||||
mov _bullet_template.BT_angle, al
|
|
||||||
mov al, _boss_statebyte[13]
|
|
||||||
mov _bullet_template.speed, al
|
|
||||||
mov ax, _boss_phase_frame
|
|
||||||
mov bx, 16
|
|
||||||
cwd
|
|
||||||
idiv bx
|
|
||||||
or dx, dx
|
|
||||||
jnz short loc_18506
|
|
||||||
mov al, _bullet_template.speed
|
|
||||||
mov ah, 0
|
|
||||||
cwd
|
|
||||||
sub ax, dx
|
|
||||||
sar ax, 1
|
|
||||||
mov _bullet_template.speed, al
|
|
||||||
|
|
||||||
loc_18506:
|
|
||||||
call _bullet_template_tune
|
|
||||||
call _bullets_add_regular
|
|
||||||
call snd_se_play pascal, 3
|
|
||||||
mov al, _boss_statebyte[15]
|
|
||||||
add al, 6
|
|
||||||
mov _boss_statebyte[15], al
|
|
||||||
mov al, _boss_statebyte[13]
|
|
||||||
add al, 4
|
|
||||||
mov _boss_statebyte[13], al
|
|
||||||
|
|
||||||
loc_18524:
|
|
||||||
pop bp
|
|
||||||
retn
|
|
||||||
sub_184BC endp
|
|
||||||
|
|
||||||
|
|
||||||
; =============== S U B R O U T I N E =======================================
|
|
||||||
|
|
||||||
; Attributes: bp-based frame
|
|
||||||
|
|
||||||
sub_18526 proc near
|
|
||||||
push bp
|
|
||||||
mov bp, sp
|
|
||||||
mov ax, _boss_phase_frame
|
|
||||||
mov bx, 8
|
|
||||||
cwd
|
|
||||||
idiv bx
|
|
||||||
or dx, dx
|
|
||||||
jnz short loc_1858E
|
|
||||||
mov _bullet_template.spawn_type, BST_NORMAL
|
|
||||||
mov _bullet_template.BT_group, BG_RING
|
|
||||||
mov _bullet_template.spread, 3
|
|
||||||
mov _bullet_template.patnum, PAT_BULLET16_N_BLUE
|
|
||||||
mov al, _boss_statebyte[14]
|
|
||||||
mov _bullet_template.BT_angle, al
|
|
||||||
mov al, _boss_statebyte[13]
|
|
||||||
mov _bullet_template.speed, al
|
|
||||||
mov ax, _boss_phase_frame
|
|
||||||
mov bx, 16
|
|
||||||
cwd
|
|
||||||
idiv bx
|
|
||||||
or dx, dx
|
|
||||||
jnz short loc_18570
|
|
||||||
mov al, _bullet_template.speed
|
|
||||||
mov ah, 0
|
|
||||||
cwd
|
|
||||||
sub ax, dx
|
|
||||||
sar ax, 1
|
|
||||||
mov _bullet_template.speed, al
|
|
||||||
|
|
||||||
loc_18570:
|
|
||||||
call _bullet_template_tune
|
|
||||||
call _bullets_add_regular
|
|
||||||
call snd_se_play pascal, 3
|
|
||||||
mov al, _boss_statebyte[14]
|
|
||||||
add al, -6
|
|
||||||
mov _boss_statebyte[14], al
|
|
||||||
mov al, _boss_statebyte[13]
|
|
||||||
add al, 4
|
|
||||||
mov _boss_statebyte[13], al
|
|
||||||
|
|
||||||
loc_1858E:
|
|
||||||
pop bp
|
|
||||||
retn
|
|
||||||
sub_18526 endp
|
|
||||||
|
|
||||||
|
|
||||||
; =============== S U B R O U T I N E =======================================
|
; =============== S U B R O U T I N E =======================================
|
||||||
|
|
||||||
; Attributes: bp-based frame
|
; Attributes: bp-based frame
|
||||||
|
@ -20963,8 +20863,8 @@ off_22758 dw offset @pattern_blue_curve_counterclockw$qv
|
||||||
off_2275E dw offset @pattern_red_stacks$qv
|
off_2275E dw offset @pattern_red_stacks$qv
|
||||||
dw offset @pattern_pellet_arcs_at_expanding$qv
|
dw offset @pattern_pellet_arcs_at_expanding$qv
|
||||||
dw offset @pattern_random_red_rings$qv
|
dw offset @pattern_random_red_rings$qv
|
||||||
dw offset sub_184BC
|
dw offset @pattern_accelerating_spirals_clo$qv
|
||||||
dw offset sub_18526
|
dw offset @pattern_accelerating_spirals_cou$qv
|
||||||
off_22768 dw offset sub_198B7
|
off_22768 dw offset sub_198B7
|
||||||
dw offset sub_19928
|
dw offset sub_19928
|
||||||
dw offset sub_1999A
|
dw offset sub_1999A
|
||||||
|
|
Loading…
Reference in New Issue