mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
Merge branch 'zmaster'
This commit is contained in:
commit
14400c41b6
3 changed files with 22 additions and 7 deletions
|
@ -390,13 +390,14 @@ void DPSprite::SetState(FState *newstate, bool pending)
|
||||||
|
|
||||||
if (ID != PSP_FLASH)
|
if (ID != PSP_FLASH)
|
||||||
{ // It's still possible to set the flash layer's offsets with the action function.
|
{ // It's still possible to set the flash layer's offsets with the action function.
|
||||||
|
// Anything going through here cannot be reliably interpolated so this has to reset the interpolation coordinates if it changes the values.
|
||||||
if (newstate->GetMisc1())
|
if (newstate->GetMisc1())
|
||||||
{ // Set coordinates.
|
{ // Set coordinates.
|
||||||
x = newstate->GetMisc1();
|
oldx = x = newstate->GetMisc1();
|
||||||
}
|
}
|
||||||
if (newstate->GetMisc2())
|
if (newstate->GetMisc2())
|
||||||
{
|
{
|
||||||
y = newstate->GetMisc2();
|
oldy = y = newstate->GetMisc2();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1041,6 +1042,7 @@ enum WOFFlags
|
||||||
WOF_KEEPX = 1,
|
WOF_KEEPX = 1,
|
||||||
WOF_KEEPY = 1 << 1,
|
WOF_KEEPY = 1 << 1,
|
||||||
WOF_ADD = 1 << 2,
|
WOF_ADD = 1 << 2,
|
||||||
|
WOF_INTERPOLATE = 1 << 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
void A_OverlayOffset(AActor *self, int layer, double wx, double wy, int flags)
|
void A_OverlayOffset(AActor *self, int layer, double wx, double wy, int flags)
|
||||||
|
@ -1069,6 +1071,7 @@ void A_OverlayOffset(AActor *self, int layer, double wx, double wy, int flags)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
psp->x = wx;
|
psp->x = wx;
|
||||||
|
if (!(flags & WOF_INTERPOLATE)) psp->oldx = psp->x;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!(flags & WOF_KEEPY))
|
if (!(flags & WOF_KEEPY))
|
||||||
|
@ -1080,6 +1083,7 @@ void A_OverlayOffset(AActor *self, int layer, double wx, double wy, int flags)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
psp->y = wy;
|
psp->y = wy;
|
||||||
|
if (!(flags & WOF_INTERPOLATE)) psp->oldy = psp->y;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1184,6 +1184,11 @@ void CALLBACK ExitFatally (ULONG_PTR dummy)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
CONTEXT MainThreadContext;
|
||||||
|
}
|
||||||
|
|
||||||
LONG WINAPI CatchAllExceptions (LPEXCEPTION_POINTERS info)
|
LONG WINAPI CatchAllExceptions (LPEXCEPTION_POINTERS info)
|
||||||
{
|
{
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
|
@ -1208,11 +1213,7 @@ LONG WINAPI CatchAllExceptions (LPEXCEPTION_POINTERS info)
|
||||||
// Otherwise, put the crashing thread to sleep and signal the main thread to clean up.
|
// Otherwise, put the crashing thread to sleep and signal the main thread to clean up.
|
||||||
if (GetCurrentThreadId() == MainThreadID)
|
if (GetCurrentThreadId() == MainThreadID)
|
||||||
{
|
{
|
||||||
#ifndef _M_X64
|
*info->ContextRecord = MainThreadContext;
|
||||||
info->ContextRecord->Eip = (DWORD_PTR)ExitFatally;
|
|
||||||
#else
|
|
||||||
info->ContextRecord->Rip = (DWORD_PTR)ExitFatally;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1304,6 +1305,15 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE nothing, LPSTR cmdline, int n
|
||||||
if (MainThread != INVALID_HANDLE_VALUE)
|
if (MainThread != INVALID_HANDLE_VALUE)
|
||||||
{
|
{
|
||||||
SetUnhandledExceptionFilter (CatchAllExceptions);
|
SetUnhandledExceptionFilter (CatchAllExceptions);
|
||||||
|
|
||||||
|
static bool setJumpResult = false;
|
||||||
|
RtlCaptureContext(&MainThreadContext);
|
||||||
|
if (setJumpResult)
|
||||||
|
{
|
||||||
|
ExitFatally(0);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
setJumpResult = true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -703,6 +703,7 @@ enum EWeaponOffsetFlags
|
||||||
WOF_KEEPX = 1,
|
WOF_KEEPX = 1,
|
||||||
WOF_KEEPY = 1 << 1,
|
WOF_KEEPY = 1 << 1,
|
||||||
WOF_ADD = 1 << 2,
|
WOF_ADD = 1 << 2,
|
||||||
|
WOF_INTERPOLATE = 1 << 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Flags for psprite layers
|
// Flags for psprite layers
|
||||||
|
|
Loading…
Reference in a new issue