mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-22 12:41:21 +00:00
Den sowieso nur noch optionalen Assemblercode rausgeschmissen.
Heutige Computer sind alle so schnell, dass der Gewinn nahe Null sein dürfte. Vielleicht ist er durch bessere Compiler sogar negativ. Außerdem ist der Krams nicht portabel, er läuft nur unter Winows auf i386 CPUs.
This commit is contained in:
parent
5ddc0f5fab
commit
11758fa473
2 changed files with 0 additions and 138 deletions
|
@ -583,10 +583,3 @@ void CL_DrawInventory (void);
|
|||
//
|
||||
void CL_PredictMovement (void);
|
||||
|
||||
#if id386
|
||||
void x86_TimerStart( void );
|
||||
void x86_TimerStop( void );
|
||||
void x86_TimerInit( unsigned long smallest, unsigned longest );
|
||||
unsigned long *x86_TimerGetHistogram( void );
|
||||
#endif
|
||||
|
||||
|
|
|
@ -28,11 +28,6 @@ int snd_scaletable[32][256];
|
|||
int *snd_p, snd_linear_count, snd_vol;
|
||||
short *snd_out;
|
||||
|
||||
void S_WriteLinearBlastStereo16 (void);
|
||||
|
||||
#if !((defined __linux__ || defined __FreeBSD__) && defined __i386__) || defined C_ONLY
|
||||
#if !id386
|
||||
|
||||
void S_WriteLinearBlastStereo16 (void)
|
||||
{
|
||||
int i;
|
||||
|
@ -57,53 +52,6 @@ void S_WriteLinearBlastStereo16 (void)
|
|||
snd_out[i+1] = val;
|
||||
}
|
||||
}
|
||||
#else
|
||||
__declspec( naked ) void S_WriteLinearBlastStereo16 (void)
|
||||
{
|
||||
__asm {
|
||||
|
||||
push edi
|
||||
push ebx
|
||||
mov ecx,ds:dword ptr[snd_linear_count]
|
||||
mov ebx,ds:dword ptr[snd_p]
|
||||
mov edi,ds:dword ptr[snd_out]
|
||||
LWLBLoopTop:
|
||||
mov eax,ds:dword ptr[-8+ebx+ecx*4]
|
||||
sar eax,8
|
||||
cmp eax,07FFFh
|
||||
jg LClampHigh
|
||||
cmp eax,0FFFF8000h
|
||||
jnl LClampDone
|
||||
mov eax,0FFFF8000h
|
||||
jmp LClampDone
|
||||
LClampHigh:
|
||||
mov eax,07FFFh
|
||||
LClampDone:
|
||||
mov edx,ds:dword ptr[-4+ebx+ecx*4]
|
||||
sar edx,8
|
||||
cmp edx,07FFFh
|
||||
jg LClampHigh2
|
||||
cmp edx,0FFFF8000h
|
||||
jnl LClampDone2
|
||||
mov edx,0FFFF8000h
|
||||
jmp LClampDone2
|
||||
LClampHigh2:
|
||||
mov edx,07FFFh
|
||||
LClampDone2:
|
||||
shl edx,16
|
||||
and eax,0FFFFh
|
||||
or edx,eax
|
||||
mov ds:dword ptr[-4+edi+ecx*2],edx
|
||||
sub ecx,2
|
||||
jnz LWLBLoopTop
|
||||
pop ebx
|
||||
pop edi
|
||||
ret
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void S_TransferStereo16 (unsigned long *pbuf, int endtime)
|
||||
{
|
||||
|
@ -363,10 +311,6 @@ void S_InitScaletable (void)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
#if !((defined __linux__ || __FreeBSD__) && defined __i386__) || defined C_ONLY
|
||||
#if !id386
|
||||
|
||||
void S_PaintChannelFrom8 (channel_t *ch, sfxcache_t *sc, int count, int offset)
|
||||
{
|
||||
int data;
|
||||
|
@ -398,81 +342,6 @@ void S_PaintChannelFrom8 (channel_t *ch, sfxcache_t *sc, int count, int offset)
|
|||
ch->pos += count;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
__declspec( naked ) void S_PaintChannelFrom8 (channel_t *ch, sfxcache_t *sc, int count, int offset)
|
||||
{
|
||||
__asm {
|
||||
push esi
|
||||
push edi
|
||||
push ebx
|
||||
push ebp
|
||||
mov ebx,ds:dword ptr[4+16+esp]
|
||||
mov esi,ds:dword ptr[8+16+esp]
|
||||
mov eax,ds:dword ptr[4+ebx]
|
||||
mov edx,ds:dword ptr[8+ebx]
|
||||
cmp eax,255
|
||||
jna LLeftSet
|
||||
mov eax,255
|
||||
LLeftSet:
|
||||
cmp edx,255
|
||||
jna LRightSet
|
||||
mov edx,255
|
||||
LRightSet:
|
||||
and eax,0F8h
|
||||
add esi,20
|
||||
and edx,0F8h
|
||||
mov edi,ds:dword ptr[16+ebx]
|
||||
mov ecx,ds:dword ptr[12+16+esp]
|
||||
add esi,edi
|
||||
shl eax,7
|
||||
add edi,ecx
|
||||
shl edx,7
|
||||
mov ds:dword ptr[16+ebx],edi
|
||||
add eax,offset snd_scaletable
|
||||
add edx,offset snd_scaletable
|
||||
sub ebx,ebx
|
||||
mov bl,ds:byte ptr[-1+esi+ecx*1]
|
||||
test ecx,1
|
||||
jz LMix8Loop
|
||||
mov edi,ds:dword ptr[eax+ebx*4]
|
||||
mov ebp,ds:dword ptr[edx+ebx*4]
|
||||
add edi,ds:dword ptr[paintbuffer+0-8+ecx*8]
|
||||
add ebp,ds:dword ptr[paintbuffer+4-8+ecx*8]
|
||||
mov ds:dword ptr[paintbuffer+0-8+ecx*8],edi
|
||||
mov ds:dword ptr[paintbuffer+4-8+ecx*8],ebp
|
||||
mov bl,ds:byte ptr[-2+esi+ecx*1]
|
||||
dec ecx
|
||||
jz LDone
|
||||
LMix8Loop:
|
||||
mov edi,ds:dword ptr[eax+ebx*4]
|
||||
mov ebp,ds:dword ptr[edx+ebx*4]
|
||||
add edi,ds:dword ptr[paintbuffer+0-8+ecx*8]
|
||||
add ebp,ds:dword ptr[paintbuffer+4-8+ecx*8]
|
||||
mov bl,ds:byte ptr[-2+esi+ecx*1]
|
||||
mov ds:dword ptr[paintbuffer+0-8+ecx*8],edi
|
||||
mov ds:dword ptr[paintbuffer+4-8+ecx*8],ebp
|
||||
mov edi,ds:dword ptr[eax+ebx*4]
|
||||
mov ebp,ds:dword ptr[edx+ebx*4]
|
||||
mov bl,ds:byte ptr[-3+esi+ecx*1]
|
||||
add edi,ds:dword ptr[paintbuffer+0-8*2+ecx*8]
|
||||
add ebp,ds:dword ptr[paintbuffer+4-8*2+ecx*8]
|
||||
mov ds:dword ptr[paintbuffer+0-8*2+ecx*8],edi
|
||||
mov ds:dword ptr[paintbuffer+4-8*2+ecx*8],ebp
|
||||
sub ecx,2
|
||||
jnz LMix8Loop
|
||||
LDone:
|
||||
pop ebp
|
||||
pop ebx
|
||||
pop edi
|
||||
pop esi
|
||||
ret
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void S_PaintChannelFrom16 (channel_t *ch, sfxcache_t *sc, int count, int offset)
|
||||
{
|
||||
int data;
|
||||
|
|
Loading…
Reference in a new issue