From 0929d91e50d5dfedba51c76bdef022fa3e2e414b Mon Sep 17 00:00:00 2001 From: nmlgc Date: Wed, 3 Mar 2021 17:48:45 +0100 Subject: [PATCH] [Translation unit catch-up] [th03] snd_kaja_interrupt() Part of P0136, funded by [Anonymous]. --- Makefile.mak | 8 +++++--- th02/snd/kajaint.asm | 24 ------------------------ th03/snd_kaja.c | 1 + th03_main.asm | 3 ++- th03_mainl.asm | 2 +- th03_op.asm | 2 +- 6 files changed, 10 insertions(+), 30 deletions(-) delete mode 100644 th02/snd/kajaint.asm create mode 100644 th03/snd_kaja.c diff --git a/Makefile.mak b/Makefile.mak index c4df29d6..be48b989 100644 --- a/Makefile.mak +++ b/Makefile.mak @@ -95,6 +95,8 @@ bin\th02\maine.exe: bin\th02\maine.obj bin\th02\grppsafx.obj th02\maine021.cpp b $** | +{th03}.c{bin\th03}.obj: + $(CC) $(CFLAGS) -ml -Z -DGAME=3 -n$(@D) -c $** {th03}.cpp{bin\th03}.obj: $(CC) $(CFLAGS) -ml -Z -DGAME=3 -n$(@D) -c $** @@ -103,17 +105,17 @@ bin\th03\res_yume.com: th03\res_yume.cpp $** | masters.lib -bin\th03\op.exe: th03\op_01.cpp bin\th03\op.obj bin\th03\initop.obj bin\th03\cdg_load.obj bin\th03\grppsafx.obj bin\th03\pi_load.obj bin\th03\inp_m_w.obj bin\th03\cdg_p_na.obj bin\hfliplut.obj bin\frmdely2.obj +bin\th03\op.exe: th03\op_01.cpp bin\th03\op.obj bin\th03\snd_kaja.obj bin\th03\initop.obj bin\th03\cdg_load.obj bin\th03\grppsafx.obj bin\th03\pi_load.obj bin\th03\inp_m_w.obj bin\th03\cdg_p_na.obj bin\hfliplut.obj bin\frmdely2.obj $(CC) $(CFLAGS) $(LARGE_LFLAGS) -3 -Z -DGAME=3 -nbin\th03\ -eOP.EXE @&&| $** | -bin\th03\main.exe: bin\th03\main.obj th03\main_01.cpp bin\th03\initmain.obj bin\th03\pi_load.obj bin\th03\inp_m_w.obj bin\hfliplut.obj th03\mrs.cpp th03\sprite16.cpp +bin\th03\main.exe: bin\th03\main.obj th03\main_01.cpp bin\th03\snd_kaja.obj bin\th03\initmain.obj bin\th03\pi_load.obj bin\th03\inp_m_w.obj bin\hfliplut.obj th03\mrs.cpp th03\sprite16.cpp $(CC) $(CFLAGS) $(LARGE_LFLAGS) -Z -DGAME=3 -nbin\th03\ -eMAIN.EXE @&&| $** | -bin\th03\mainl.exe: bin\th03\mainl.obj bin\th03\initmain.obj bin\th03\cdg_load.obj th03\exitmain.cpp bin\th03\grppsafx.obj bin\th03\snd_dlym.obj bin\th03\inp_wait.obj bin\th03\pi_load.obj bin\th03\pi_put_q.obj bin\th03\inp_m_w.obj bin\th03\cdg_p_na.obj bin\hfliplut.obj +bin\th03\mainl.exe: bin\th03\mainl.obj bin\th03\snd_kaja.obj bin\th03\initmain.obj bin\th03\cdg_load.obj th03\exitmain.cpp bin\th03\grppsafx.obj bin\th03\snd_dlym.obj bin\th03\inp_wait.obj bin\th03\pi_load.obj bin\th03\pi_put_q.obj bin\th03\inp_m_w.obj bin\th03\cdg_p_na.obj bin\hfliplut.obj $(CC) $(CFLAGS) $(LARGE_LFLAGS) -DGAME=3 -nbin\th03\ -eMAINL.EXE @&&| $** | diff --git a/th02/snd/kajaint.asm b/th02/snd/kajaint.asm deleted file mode 100644 index 4ce18ac3..00000000 --- a/th02/snd/kajaint.asm +++ /dev/null @@ -1,24 +0,0 @@ -proc_defconv snd_kaja_interrupt, SND_KAJA_INTERRUPT - arg returns @@ax:word - - push bp - mov bp, sp - cmp _snd_active, 0 - jz short @@ret - mov ax, @@ax - cmp _snd_midi_active, 1 - jz short @@midi - int 60h - jmp short @@ret - -@@midi: - int 61h - -@@ret: - pop bp -if GAME ge 3 - ret 2 -else - ret -endif -endp_defconv diff --git a/th03/snd_kaja.c b/th03/snd_kaja.c new file mode 100644 index 00000000..eb402374 --- /dev/null +++ b/th03/snd_kaja.c @@ -0,0 +1 @@ +#include "th02/snd/kajaint.c" diff --git a/th03_main.asm b/th03_main.asm index e35d7ddc..b3a18a73 100644 --- a/th03_main.asm +++ b/th03_main.asm @@ -8891,7 +8891,7 @@ include th02/hardware/frame_delay.asm include th03/hardware/input_sense.asm nop include th02/snd/se.asm -include th02/snd/kajaint.asm + extern SND_KAJA_INTERRUPT:proc extern GAME_INIT_MAIN:proc extern INPUT_MODE_KEY_VS_KEY:proc extern INPUT_MODE_JOY_VS_KEY:proc @@ -35044,6 +35044,7 @@ include libs/master.lib/wordmask[data].asm include libs/master.lib/mem[data].asm include libs/master.lib/super_entry_bfnt[data].asm include libs/master.lib/superpa[data].asm +public _snd_active _snd_active db 0 db 0 include libs/master.lib/respal_exist[data].asm diff --git a/th03_mainl.asm b/th03_mainl.asm index 158a5d7d..5390ba5b 100644 --- a/th03_mainl.asm +++ b/th03_mainl.asm @@ -5535,7 +5535,7 @@ include th02/formats/pi_palette_apply.asm include th02/formats/pi_put.asm include th03/formats/pi_put_interlace.asm include th02/snd/se.asm -include th02/snd/kajaint.asm + extern SND_KAJA_INTERRUPT:proc extern GAME_INIT_MAIN:proc extern CDG_LOAD_SINGLE:proc extern CDG_LOAD_SINGLE_NOALPHA:proc diff --git a/th03_op.asm b/th03_op.asm index b6a0acee..5e418ee1 100644 --- a/th03_op.asm +++ b/th03_op.asm @@ -3626,7 +3626,7 @@ include th02/hardware/frame_delay.asm include th03/hardware/input_sense.asm include th02/formats/pi_palette_apply.asm include th02/formats/pi_put.asm -include th02/snd/kajaint.asm + extern SND_KAJA_INTERRUPT:proc extern _game_init_op:proc extern CDG_LOAD_SINGLE:proc extern CDG_LOAD_SINGLE_NOALPHA:proc