mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-10 07:11:46 +00:00
Merge branch 'main' into vs2019
This commit is contained in:
commit
693264caf4
5 changed files with 34 additions and 12 deletions
|
@ -28,13 +28,35 @@
|
|||
; Call to compiled code after setting up the register environment for the VM
|
||||
; prototype:
|
||||
; uint8_t qvmcall64(int *programStack, int *opStack, intptr_t *instructionPointers, byte *dataBase);
|
||||
;
|
||||
; This call-stub has its own custom calling convention due to pushing all non-volatile registers
|
||||
; to the stack. The game uses set/longjmp which on Windows uses "RtlUnwindEx" to unwind the callstack.
|
||||
; This function cannot be unwound by default due to the custom calling convention.
|
||||
; To allow unwinding, we need to add custom SEH unwind data to the function.
|
||||
|
||||
qvmcall64 PROC
|
||||
push rsi ; push non-volatile registers to stack
|
||||
qvmcall64 PROC FRAME
|
||||
push r12 ; push all non-volatile registers to stack
|
||||
.pushreg r12
|
||||
push r13
|
||||
.pushreg r13
|
||||
push r14
|
||||
.pushreg r14
|
||||
push r15
|
||||
.pushreg r15
|
||||
push rdi
|
||||
.pushreg rdi
|
||||
push rsi
|
||||
.pushreg rsi
|
||||
push rbx
|
||||
.pushreg rbx
|
||||
push rbp
|
||||
.pushreg rbp
|
||||
|
||||
; need to save pointer in rcx so we can write back the programData value to caller
|
||||
push rcx
|
||||
.pushreg rcx
|
||||
|
||||
.endprolog ; custom unwind data ends here
|
||||
|
||||
; registers r8 and r9 have correct value already thanx to __fastcall
|
||||
xor rbx, rbx ; opStackOfs starts out being 0
|
||||
|
@ -48,9 +70,14 @@ qvmcall64 PROC
|
|||
mov dword ptr [rcx], esi ; write back the programStack value
|
||||
mov al, bl ; return opStack offset
|
||||
|
||||
pop rbp ; restore all non-volatile registers after the call
|
||||
pop rbx
|
||||
pop rdi
|
||||
pop rsi
|
||||
pop rdi
|
||||
pop r15
|
||||
pop r14
|
||||
pop r13
|
||||
pop r12
|
||||
|
||||
ret
|
||||
qvmcall64 ENDP
|
||||
|
|
|
@ -3733,7 +3733,7 @@ void BotMapScripts(bot_state_t *bs) {
|
|||
shootbutton = qfalse;
|
||||
break;
|
||||
}
|
||||
else if (bs->enemy == i) {
|
||||
else if (gametype < GT_CTF || bs->enemy == i) {
|
||||
shootbutton = qtrue;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1346,7 +1346,7 @@ void RB_IQMSurfaceAnim( surfaceType_t *surface ) {
|
|||
vtxMat[10] = blendWeights[0] * poseMats[12 * data->influenceBlendIndexes[4*influence + 0] + 10];
|
||||
vtxMat[11] = blendWeights[0] * poseMats[12 * data->influenceBlendIndexes[4*influence + 0] + 11];
|
||||
|
||||
for( j = 1; j < 3; j++ ) {
|
||||
for( j = 1; j < 4; j++ ) {
|
||||
if ( blendWeights[j] <= 0.0f ) {
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1528,7 +1528,7 @@ void RB_IQMSurfaceAnim( surfaceType_t *surface ) {
|
|||
vtxMat[10] = blendWeights[0] * poseMats[12 * data->influenceBlendIndexes[4*influence + 0] + 10];
|
||||
vtxMat[11] = blendWeights[0] * poseMats[12 * data->influenceBlendIndexes[4*influence + 0] + 11];
|
||||
|
||||
for( j = 1; j < 3; j++ ) {
|
||||
for( j = 1; j < 4; j++ ) {
|
||||
if ( blendWeights[j] <= 0.0f ) {
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -281,12 +281,7 @@ qboolean SNDDMA_Init(void)
|
|||
#ifdef USE_SDL_AUDIO_CAPTURE
|
||||
// !!! FIXME: some of these SDL_OpenAudioDevice() values should be cvars.
|
||||
s_sdlCapture = Cvar_Get( "s_sdlCapture", "1", CVAR_ARCHIVE | CVAR_LATCH );
|
||||
// !!! FIXME: pulseaudio capture records audio the entire time the program is running. https://bugzilla.libsdl.org/show_bug.cgi?id=4087
|
||||
if (Q_stricmp(SDL_GetCurrentAudioDriver(), "pulseaudio") == 0)
|
||||
{
|
||||
Com_Printf("SDL audio capture support disabled for pulseaudio (https://bugzilla.libsdl.org/show_bug.cgi?id=4087)\n");
|
||||
}
|
||||
else if (!s_sdlCapture->integer)
|
||||
if (!s_sdlCapture->integer)
|
||||
{
|
||||
Com_Printf("SDL audio capture support disabled by user ('+set s_sdlCapture 1' to enable)\n");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue