From 74c84cbe1f7872ba4b64e1ac6220c68dacbf808f Mon Sep 17 00:00:00 2001 From: Jamie Wilkinson Date: Sat, 13 Jul 2002 02:02:00 +0000 Subject: [PATCH] - Put back snd_mixa.S into the build if assembler is defined, and adjusted the preprocessor directives in snd_mix.c to fit. --- src/Makefile.am | 13 ++++++++++--- src/snd_mix.c | 8 ++++++-- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index a9660b3..e5ea0e2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -30,6 +30,12 @@ else REF_SOFT_ASM = endif +if ASM_ARCH +QUAKE2_ASM=snd_mixa.S +else +QUAKE2_ASM= +endif + quake2_SOURCES = main.c q_sh.c vid_menu.c vid_so.c glob.c net_udp.c \ \ cl_cin.c cl_ents.c cl_fx.c cl_input.c cl_inv.c \ @@ -48,9 +54,10 @@ quake2_SOURCES = main.c q_sh.c vid_menu.c vid_so.c glob.c net_udp.c \ \ q_shared.c pmove.c \ \ - m_flash.c -# \ -# #snd_mixa.S + m_flash.c \ + \ + $(QUAKE2_ASM) + quake2_CFLAGS = $(std_cflags) @INCLTDL@ @PTHREAD_CFLAGS@ # the macro puts -pthread into cflags, but we want to link # with this flag too, so stick it into the ldflags if it's there... diff --git a/src/snd_mix.c b/src/snd_mix.c index 1c38a02..1a2aed7 100644 --- a/src/snd_mix.c +++ b/src/snd_mix.c @@ -78,7 +78,8 @@ LClampDone2: ret } } -#else +#else /* HAVE_MASM */ +# ifndef USE_ASM void S_WriteLinearBlastStereo16 (void) { int i; int val; @@ -102,6 +103,7 @@ void S_WriteLinearBlastStereo16 (void) { snd_out[i+1] = val; } } +# endif /* !USE_ASM */ #endif /* HAVE_MASM */ void S_TransferStereo16 (unsigned long *pbuf, int endtime) @@ -429,7 +431,8 @@ LDone: ret } } -#else +#else /* HAVE_MASM */ +# ifndef USE_ASM void S_PaintChannelFrom8 (channel_t *ch, sfxcache_t *sc, int count, int offset) { int data; int *lscale, *rscale; @@ -459,6 +462,7 @@ void S_PaintChannelFrom8 (channel_t *ch, sfxcache_t *sc, int count, int offset) ch->pos += count; } +# endif /* !USE_ASM */ #endif /* HAVE_MASM */ void S_PaintChannelFrom16 (channel_t *ch, sfxcache_t *sc, int count, int offset)