From 9293a4536890e7678db34f9e8b4a13f1997f68f0 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sat, 23 Aug 2025 10:17:03 +0100 Subject: [PATCH] asm: Remove unused S_PaintChannelFrom8 This is `#if 0` anyway, and has been since the initial Quake 3 Arena GPL release, so clearly it hasn't been used for some time. Signed-off-by: Simon McVittie --- code/asm/snd_mixa.S | 111 -------------------------------------------- 1 file changed, 111 deletions(-) diff --git a/code/asm/snd_mixa.S b/code/asm/snd_mixa.S index 7c3bf6b2..0fe3a7a8 100644 --- a/code/asm/snd_mixa.S +++ b/code/asm/snd_mixa.S @@ -30,117 +30,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA .text -#if 0 -//---------------------------------------------------------------------- -// 8-bit sound-mixing code -//---------------------------------------------------------------------- - -#define ch 4+16 -#define sc 8+16 -#define count 12+16 - -.globl C(S_PaintChannelFrom8) -C(S_PaintChannelFrom8): - pushl %esi // preserve register variables - pushl %edi - pushl %ebx - pushl %ebp - -// int data; -// short *lscale, *rscale; -// unsigned char *sfx; -// int i; - - movl ch(%esp),%ebx - movl sc(%esp),%esi - -// if (ch->leftvol > 255) -// ch->leftvol = 255; -// if (ch->rightvol > 255) -// ch->rightvol = 255; - movl ch_leftvol(%ebx),%eax - movl ch_rightvol(%ebx),%edx - cmpl $255,%eax - jna LLeftSet - movl $255,%eax -LLeftSet: - cmpl $255,%edx - jna LRightSet - movl $255,%edx -LRightSet: - -// lscale = snd_scaletable[ch->leftvol >> 3]; -// rscale = snd_scaletable[ch->rightvol >> 3]; -// sfx = (signed char *)sc->data + ch->pos; -// ch->pos += count; - andl $0xF8,%eax - addl $20,%esi - movl (%esi),%esi - andl $0xF8,%edx - movl ch_pos(%ebx),%edi - movl count(%esp),%ecx - addl %edi,%esi - shll $7,%eax - addl %ecx,%edi - shll $7,%edx - movl %edi,ch_pos(%ebx) - addl $(C(snd_scaletable)),%eax - addl $(C(snd_scaletable)),%edx - subl %ebx,%ebx - movb -1(%esi,%ecx,1),%bl - - testl $1,%ecx - jz LMix8Loop - - movl (%eax,%ebx,4),%edi - movl (%edx,%ebx,4),%ebp - addl C(paintbuffer)+psp_left-psp_size(,%ecx,psp_size),%edi - addl C(paintbuffer)+psp_right-psp_size(,%ecx,psp_size),%ebp - movl %edi,C(paintbuffer)+psp_left-psp_size(,%ecx,psp_size) - movl %ebp,C(paintbuffer)+psp_right-psp_size(,%ecx,psp_size) - movb -2(%esi,%ecx,1),%bl - - decl %ecx - jz LDone - -// for (i=0 ; i