diff --git a/th04/main/player/bb_playchar_put.asm b/th04/main/player/bb_playchar_put.asm new file mode 100644 index 00000000..cd77406a --- /dev/null +++ b/th04/main/player/bb_playchar_put.asm @@ -0,0 +1,27 @@ +public BB_PLAYCHAR_PUT +bb_playchar_put proc near + +@@cel = word ptr 4 + + push bp + mov bp, sp + + if (GAME eq 4) + cmp _playchar, PLAYCHAR_REIMU + jnz short @@marisa + mov al, 15 + jmp short @@set_col + + @@marisa: + mov al, 2 + + @@set_col: + mov _tiles_bb_col, al + endif + + mov ax, _bb_playchar_seg + mov _tiles_bb_seg, ax + call tiles_bb_put_raw pascal, [bp+@@cel] + pop bp + retn 2 +bb_playchar_put endp diff --git a/th04/main/player/bomb.cpp b/th04/main/player/bomb.cpp new file mode 100644 index 00000000..8a37bcdc --- /dev/null +++ b/th04/main/player/bomb.cpp @@ -0,0 +1,2 @@ +void pascal near bb_playchar_put(int cel) +; diff --git a/th04_main.asm b/th04_main.asm index ce488b09..dd02cdd6 100644 --- a/th04_main.asm +++ b/th04_main.asm @@ -8553,35 +8553,7 @@ loc_10028: retn player_bomb endp - -; =============== S U B R O U T I N E ======================================= - -; Attributes: bp-based frame - -sub_1002A proc near - -@@cel = word ptr 4 - - push bp - mov bp, sp - cmp _playchar, PLAYCHAR_REIMU - jnz short loc_10038 - mov al, 0Fh - jmp short loc_1003A -; --------------------------------------------------------------------------- - -loc_10038: - mov al, 2 - -loc_1003A: - mov _tiles_bb_col, al - mov ax, _bb_playchar_seg - mov _tiles_bb_seg, ax - call tiles_bb_put_raw pascal, [bp+@@cel] - pop bp - retn 2 -sub_1002A endp - +include th04/main/player/bb_playchar_put.asm ; =============== S U B R O U T I N E ======================================= @@ -8786,7 +8758,7 @@ loc_1022A: add ax, -8 loc_1023E: - call sub_1002A pascal, ax + call bb_playchar_put pascal, ax loc_10242: jmp loc_10307 diff --git a/th05_main.asm b/th05_main.asm index ff952710..248eb5ad 100644 --- a/th05_main.asm +++ b/th05_main.asm @@ -2016,24 +2016,7 @@ loc_C518: retn player_bomb endp - -; =============== S U B R O U T I N E ======================================= - -; Attributes: bp-based frame - -sub_C51A proc near - -@@cel = word ptr 4 - - push bp - mov bp, sp - mov ax, _bb_playchar_seg - mov _tiles_bb_seg, ax - call tiles_bb_put_raw pascal, [bp+@@cel] - pop bp - retn 2 -sub_C51A endp - +include th04/main/player/bb_playchar_put.asm ; =============== S U B R O U T I N E ======================================= @@ -2129,7 +2112,7 @@ bomb_reimu proc near cwd sub ax, dx sar ax, 1 - call sub_C51A pascal, ax + call bb_playchar_put pascal, ax loc_C7AB: jmp loc_C849 @@ -2788,7 +2771,7 @@ bomb_yuuka proc near cwd sub ax, dx sar ax, 1 - call sub_C51A pascal, ax + call bb_playchar_put pascal, ax loc_CDB1: jmp loc_CE4F