From 0009c3c16105d3450c039df22656f2dac1b09c92 Mon Sep 17 00:00:00 2001 From: wintiger0222 <0xodbs02@naver.com> Date: Tue, 19 Nov 2019 14:26:47 +0000 Subject: [PATCH] [Reduction] [th03/th04/th05] game_exit_to_dos --- th02/exit_dos.asm | 11 +++++++++++ th02/initexit.h | 1 + th02/op_01.c | 1 - th03_op.asm | 18 ++---------------- th04_op.asm | 19 ++----------------- th05_op.asm | 20 ++------------------ 6 files changed, 18 insertions(+), 52 deletions(-) create mode 100644 th02/exit_dos.asm diff --git a/th02/exit_dos.asm b/th02/exit_dos.asm new file mode 100644 index 00000000..dbfa99f3 --- /dev/null +++ b/th02/exit_dos.asm @@ -0,0 +1,11 @@ +public GAME_EXIT_TO_DOS +game_exit_to_dos proc far + push bp + mov bp, sp + nopcall game_exit + call key_beep_on + call text_systemline_show + call text_cursor_show + pop bp + retf +game_exit_to_dos endp diff --git a/th02/initexit.h b/th02/initexit.h index 813145c5..5fd16f22 100644 --- a/th02/initexit.h +++ b/th02/initexit.h @@ -1 +1,2 @@ void game_exit(void); +void game_exit_to_dos(void); diff --git a/th02/op_01.c b/th02/op_01.c index 279115ce..4e353a76 100644 --- a/th02/op_01.c +++ b/th02/op_01.c @@ -31,7 +31,6 @@ extern char extra_unlocked; extern unsigned int score_duration; int game_init_op(void); -void game_exit_to_dos(void); void title_flash(void); void pascal score_menu(void); diff --git a/th03_op.asm b/th03_op.asm index bdd05187..72402a69 100644 --- a/th03_op.asm +++ b/th03_op.asm @@ -1603,7 +1603,7 @@ loc_A4FE: call sub_99C3 call gaiji_restore call text_clear - call sub_BEB8 + call game_exit_to_dos call respal_free pop bp retf @@ -4304,21 +4304,7 @@ op_02_TEXT segment word public 'CODE' use16 ;org 8 assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing -; =============== S U B R O U T I N E ======================================= - -; Attributes: bp-based frame - -sub_BEB8 proc far - push bp - mov bp, sp - nopcall game_exit - call key_beep_on - call text_systemline_show - call text_cursor_show - pop bp - retf -sub_BEB8 endp - +include th02/exit_dos.asm include th01/hardware/vram_planes_set.asm include th02/snd/detmode.asm include th02/snd/pmd_res.asm diff --git a/th04_op.asm b/th04_op.asm index bc49ecc2..ea834391 100644 --- a/th04_op.asm +++ b/th04_op.asm @@ -1557,7 +1557,7 @@ loc_B47B: call sub_A873 call gaiji_restore call text_clear - call sub_DDB1 + call game_exit_to_dos call respal_free pop si pop bp @@ -5424,22 +5424,7 @@ loc_DDA8: retf 4 sub_DD80 endp - -; =============== S U B R O U T I N E ======================================= - -; Attributes: bp-based frame - -sub_DDB1 proc far - push bp - mov bp, sp - nopcall game_exit - call key_beep_on - call text_systemline_show - call text_cursor_show - pop bp - retf -sub_DDB1 endp - +include th02/exit_dos.asm include th04/snd/load.asm ; =============== S U B R O U T I N E ======================================= diff --git a/th05_op.asm b/th05_op.asm index 4e39a113..a8b56324 100644 --- a/th05_op.asm +++ b/th05_op.asm @@ -1498,7 +1498,7 @@ loc_B058: call sub_BC83 call sub_BB91 call text_clear - call sub_D41C + call game_exit_to_dos call respal_free pop si pop bp @@ -5013,23 +5013,7 @@ include th03/formats/hfliplut.asm include th04/snd/pmd_res.asm include th02/snd/mmd_res.asm include th04/snd/detmodes.asm - -; =============== S U B R O U T I N E ======================================= - -; Attributes: bp-based frame - -sub_D41C proc far - push bp - mov bp, sp - nopcall game_exit - call key_beep_on - call text_systemline_show - call text_cursor_show - pop bp - retf -sub_D41C endp - -; --------------------------------------------------------------------------- +include th02/exit_dos.asm db 0 ; =============== S U B R O U T I N E =======================================