[Translation unit catch-up] [th03] snd_determine_mode()

Wow, it's -WX, and no workaround necessary!

Part of P0138, funded by [Anonymous] and Blue Bolt.
This commit is contained in:
nmlgc 2021-04-10 17:56:06 +02:00
parent e43e3a3fbb
commit 9d2cce16a2
6 changed files with 7 additions and 30 deletions

View File

@ -105,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\th02\snd_pmdr.obj bin\th02\snd_load.obj bin\th03\exit.obj bin\th03\vector1.obj bin\th03\cdg_put.obj bin\frmdely1.obj bin\th03\input_s.obj bin\th03\pi_put.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
bin\th03\op.exe: th03\op_01.cpp bin\th03\op.obj bin\th02\snd_mode.obj bin\th02\snd_pmdr.obj bin\th02\snd_load.obj bin\th03\exit.obj bin\th03\vector1.obj bin\th03\cdg_put.obj bin\frmdely1.obj bin\th03\input_s.obj bin\th03\pi_put.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\th02\snd_pmdr.obj bin\th03\vector2.obj bin\th03\exit.obj bin\th03\vector1.obj bin\frmdely1.obj bin\th03\input_s.obj bin\th02\snd_se_r.obj bin\th03\snd_se.obj 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
bin\th03\main.exe: bin\th03\main.obj th03\main_01.cpp bin\th02\snd_mode.obj bin\th02\snd_pmdr.obj bin\th03\vector2.obj bin\th03\exit.obj bin\th03\vector1.obj bin\frmdely1.obj bin\th03\input_s.obj bin\th02\snd_se_r.obj bin\th03\snd_se.obj 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\th02\snd_pmdr.obj bin\th02\snd_dlyv.obj bin\th02\snd_load.obj bin\th03\vector2.obj bin\th03\exit.obj bin\th03\cdg_put.obj bin\frmdely1.obj bin\th03\input_s.obj bin\th03\pi_put.obj bin\th03\pi_put_i.obj bin\th02\snd_se_r.obj bin\th03\snd_se.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
bin\th03\mainl.exe: bin\th03\mainl.obj bin\th02\snd_mode.obj bin\th02\snd_pmdr.obj bin\th02\snd_dlyv.obj bin\th02\snd_load.obj bin\th03\vector2.obj bin\th03\exit.obj bin\th03\cdg_put.obj bin\frmdely1.obj bin\th03\input_s.obj bin\th03\pi_put.obj bin\th03\pi_put_i.obj bin\th02\snd_se_r.obj bin\th03\snd_se.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 @&&|
$**
|

View File

@ -1,20 +0,0 @@
public _snd_determine_mode
_snd_determine_mode proc
mov ah, PMD_GET_DRIVER_VERSION
int 60h
xor bx, bx
cmp al, -1
jz short @@set_to_MIDI_activity
inc bx
mov _snd_fm_possible, 1
jmp short @@set_and_ret
@@set_to_MIDI_activity:
mov bl, _snd_midi_active
@@set_and_ret:
mov _snd_active, bl
mov ax, bx
ret
_snd_determine_mode endp
nop ; word alignment

View File

@ -1,4 +1,4 @@
#pragma option -zCSHARED -k-
#pragma option -WX -zCSHARED -k-
#include "platform.h"
#include "x86real.h"
@ -19,5 +19,4 @@ bool16 snd_determine_mode(void)
snd_active = _BL;
return _BX;
}
#pragma codestring "\x90"

View File

@ -8877,8 +8877,7 @@ SHARED segment word public 'CODE' use16
assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing
include th01/hardware/vram_planes_set.asm
db 0
include th02/snd/detmode.asm
extern _snd_determine_mode:proc
extern VECTOR2:proc
extern VECTOR2_BETWEEN_PLUS:proc
extern _game_exit:proc

View File

@ -5514,8 +5514,7 @@ SHARED segment word public 'CODE' use16
assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing
include th01/hardware/vram_planes_set.asm
db 0
include th02/snd/detmode.asm
extern _snd_determine_mode:proc
extern _snd_delay_until_volume:proc
extern _snd_load:proc
extern VECTOR2:proc

View File

@ -3611,7 +3611,7 @@ SHARED segment word public 'CODE' use16
include th02/exit_dos.asm
include th01/hardware/vram_planes_set.asm
include th02/snd/detmode.asm
extern _snd_determine_mode:proc
extern _snd_load:proc
extern _game_exit:proc
extern _vector1_at:proc