mirror of https://github.com/nmlgc/ReC98.git
[Decompilation] [th03] Hit circles: Spawning player circles
Part of P0280, funded by [Anonymous], Blue Bolt, and JonathKane.
This commit is contained in:
parent
179c5389a7
commit
4005de4d58
|
@ -73,3 +73,12 @@ void pascal hitcircles_enemy_add(
|
||||||
|
|
||||||
#undef last_id
|
#undef last_id
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void pascal hitcircles_player_add(
|
||||||
|
subpixel_t center_x, subpixel_t center_y, pid2 pid
|
||||||
|
)
|
||||||
|
{
|
||||||
|
HitCircle near& p = hitcircles[HITCIRCLE_ENEMY_COUNT];
|
||||||
|
p.spawn(pid);
|
||||||
|
hitcircle_set_topleft(p, center_x, center_y, pid);
|
||||||
|
}
|
||||||
|
|
|
@ -8,3 +8,6 @@ extern bool hitcircles_enemy_add_do_not_randomly_center_within_hitbox;
|
||||||
void pascal hitcircles_enemy_add(
|
void pascal hitcircles_enemy_add(
|
||||||
subpixel_t center_x, subpixel_t center_y, pid2 pid
|
subpixel_t center_x, subpixel_t center_y, pid2 pid
|
||||||
);
|
);
|
||||||
|
void pascal hitcircles_player_add(
|
||||||
|
subpixel_t center_x, subpixel_t center_y, pid2 pid
|
||||||
|
);
|
||||||
|
|
|
@ -2579,42 +2579,11 @@ loc_B724:
|
||||||
sub_B60A endp
|
sub_B60A endp
|
||||||
|
|
||||||
extern @HITCIRCLES_ENEMY_ADD$QIII:proc
|
extern @HITCIRCLES_ENEMY_ADD$QIII:proc
|
||||||
|
extern @HITCIRCLES_PLAYER_ADD$QIII:proc
|
||||||
HITCIRC_TEXT ends
|
HITCIRC_TEXT ends
|
||||||
|
|
||||||
PLAYER_M_TEXT segment byte public 'CODE' use16
|
PLAYER_M_TEXT segment byte public 'CODE' use16
|
||||||
|
|
||||||
; =============== S U B R O U T I N E =======================================
|
|
||||||
|
|
||||||
; Attributes: bp-based frame
|
|
||||||
|
|
||||||
sub_B7B3 proc far
|
|
||||||
|
|
||||||
@@pid = word ptr 6
|
|
||||||
arg_2 = word ptr 8
|
|
||||||
@@x = word ptr 0Ah
|
|
||||||
|
|
||||||
push bp
|
|
||||||
mov bp, sp
|
|
||||||
push si
|
|
||||||
mov si, offset (_hitcircles + (HITCIRCLE_ENEMY_COUNT * size hitcircle_t))
|
|
||||||
mov [si+hitcircle_t.HITCIRCLE_age], 1
|
|
||||||
mov al, byte ptr [bp+@@pid]
|
|
||||||
mov [si+hitcircle_t.HITCIRCLE_pid], al
|
|
||||||
push [bp+@@x] ; x
|
|
||||||
push [bp+@@pid] ; pid
|
|
||||||
nopcall @playfield_fg_x_to_screen$qii
|
|
||||||
add ax, -24
|
|
||||||
mov [si+hitcircle_t.HITCIRCLE_topleft.x], ax
|
|
||||||
mov ax, [bp+arg_2]
|
|
||||||
sar ax, 4
|
|
||||||
add ax, -8
|
|
||||||
mov [si+hitcircle_t.HITCIRCLE_topleft.y], ax
|
|
||||||
pop si
|
|
||||||
pop bp
|
|
||||||
retf 6
|
|
||||||
sub_B7B3 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
|
||||||
|
@ -7366,12 +7335,12 @@ loc_DDCE:
|
||||||
jz short loc_DE4F
|
jz short loc_DE4F
|
||||||
cmp byte ptr [si+7], 0
|
cmp byte ptr [si+7], 0
|
||||||
jz short loc_DE3F
|
jz short loc_DE3F
|
||||||
push word ptr [si]
|
push word ptr [si] ; center_x
|
||||||
push word ptr [si+2]
|
push word ptr [si+2] ; center_y
|
||||||
mov al, _pid_PID_current
|
mov al, _pid_PID_current
|
||||||
mov ah, 0
|
mov ah, 0
|
||||||
push ax
|
push ax ; pid
|
||||||
nopcall sub_B7B3
|
nopcall @hitcircles_player_add$qiii
|
||||||
push si
|
push si
|
||||||
call sub_E1D5
|
call sub_E1D5
|
||||||
mov dl, [si+7]
|
mov dl, [si+7]
|
||||||
|
|
Loading…
Reference in New Issue