mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
- Fixes to compile with GCC 4.5.0.
SVN r2660 (trunk)
This commit is contained in:
parent
4b817cfd8b
commit
a2573e4bb3
9 changed files with 65 additions and 16 deletions
|
@ -11,8 +11,8 @@
|
|||
#pragma once
|
||||
#endif
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#define __forceinline inline
|
||||
#if defined(__GNUC__) && !defined(__forceinline)
|
||||
#define __forceinline __inline__ __attribute__((always_inline))
|
||||
#endif
|
||||
|
||||
static __forceinline SDWORD Scale (SDWORD a, SDWORD b, SDWORD c)
|
||||
|
|
|
@ -448,9 +448,9 @@ DEFINE_ACTION_FUNCTION(AActor, A_MinotaurRoam)
|
|||
{
|
||||
// Turn
|
||||
if (pr_minotaurroam() & 1)
|
||||
self->movedir = (++self->movedir)%8;
|
||||
self->movedir = (self->movedir + 1) % 8;
|
||||
else
|
||||
self->movedir = (self->movedir+7)%8;
|
||||
self->movedir = (self->movedir + 7) % 8;
|
||||
FaceMovementDirection (self);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ void AFastProjectile::Tick ()
|
|||
tm.LastRipped = NULL; // [RH] Do rip damage each step, like Hexen
|
||||
}
|
||||
|
||||
if (!P_TryMove (this, x + xfrac,y + yfrac, true, false, tm))
|
||||
if (!P_TryMove (this, x + xfrac,y + yfrac, true, NULL, tm))
|
||||
{ // Blocked move
|
||||
if (!(flags3 & MF3_SKYEXPLODE))
|
||||
{
|
||||
|
|
|
@ -512,12 +512,12 @@ bool P_Move (AActor *actor)
|
|||
try_ok = true;
|
||||
for(int i=1; i < steps; i++)
|
||||
{
|
||||
try_ok = P_TryMove(actor, origx + Scale(deltax, i, steps), origy + Scale(deltay, i, steps), dropoff, false, tm);
|
||||
try_ok = P_TryMove(actor, origx + Scale(deltax, i, steps), origy + Scale(deltay, i, steps), dropoff, NULL, tm);
|
||||
if (!try_ok) break;
|
||||
}
|
||||
|
||||
// killough 3/15/98: don't jump over dropoffs:
|
||||
if (try_ok) try_ok = P_TryMove (actor, tryx, tryy, dropoff, false, tm);
|
||||
if (try_ok) try_ok = P_TryMove (actor, tryx, tryy, dropoff, NULL, tm);
|
||||
|
||||
// [GrafZahl] Interpolating monster movement as it is done here just looks bad
|
||||
// so make it switchable
|
||||
|
|
|
@ -4963,7 +4963,7 @@ bool P_CheckMissileSpawn (AActor* th)
|
|||
bool MBFGrenade = (!(th->flags & MF_MISSILE) || (th->BounceFlags & BOUNCE_MBF));
|
||||
|
||||
// killough 3/15/98: no dropoff (really = don't care for missiles)
|
||||
if (!(P_TryMove (th, th->x, th->y, false, false, tm)))
|
||||
if (!(P_TryMove (th, th->x, th->y, false, NULL, tm)))
|
||||
{
|
||||
// [RH] Don't explode ripping missiles that spawn inside something
|
||||
if (th->BlockingMobj == NULL || !(th->flags2 & MF2_RIP) || (th->BlockingMobj->flags5 & MF5_DONTRIP))
|
||||
|
|
|
@ -1975,7 +1975,7 @@ void P_CrouchMove(player_t * player, int direction)
|
|||
|
||||
// check whether the move is ok
|
||||
player->mo->height = FixedMul(defaultheight, player->crouchfactor);
|
||||
if (!P_TryMove(player->mo, player->mo->x, player->mo->y, false, false))
|
||||
if (!P_TryMove(player->mo, player->mo->x, player->mo->y, false, NULL))
|
||||
{
|
||||
player->mo->height = savedheight;
|
||||
if (direction > 0)
|
||||
|
|
|
@ -202,7 +202,7 @@ FPNGTexture::FPNGTexture (FileReader &lump, int lumpnum, const FString &filename
|
|||
{
|
||||
DWORD palette[256];
|
||||
BYTE pngpal[256][3];
|
||||
};
|
||||
} p;
|
||||
BYTE trans[256];
|
||||
bool havetRNS = false;
|
||||
DWORD len, id;
|
||||
|
@ -260,14 +260,14 @@ FPNGTexture::FPNGTexture (FileReader &lump, int lumpnum, const FString &filename
|
|||
|
||||
case MAKE_ID('P','L','T','E'):
|
||||
PaletteSize = MIN<int> (len / 3, 256);
|
||||
lump.Read (pngpal, PaletteSize * 3);
|
||||
lump.Read (p.pngpal, PaletteSize * 3);
|
||||
if (PaletteSize * 3 != (int)len)
|
||||
{
|
||||
lump.Seek (len - PaletteSize * 3, SEEK_CUR);
|
||||
}
|
||||
for (i = PaletteSize - 1; i >= 0; --i)
|
||||
{
|
||||
palette[i] = MAKERGB(pngpal[i][0], pngpal[i][1], pngpal[i][2]);
|
||||
p.palette[i] = MAKERGB(p.pngpal[i][0], p.pngpal[i][1], p.pngpal[i][2]);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -314,7 +314,7 @@ FPNGTexture::FPNGTexture (FileReader &lump, int lumpnum, const FString &filename
|
|||
|
||||
case 3: // Paletted
|
||||
PaletteMap = new BYTE[PaletteSize];
|
||||
GPalette.MakeRemap (palette, PaletteMap, trans, PaletteSize);
|
||||
GPalette.MakeRemap (p.palette, PaletteMap, trans, PaletteSize);
|
||||
for (i = 0; i < PaletteSize; ++i)
|
||||
{
|
||||
if (trans[i] == 0)
|
||||
|
|
|
@ -69,6 +69,54 @@
|
|||
#include <time.h>
|
||||
#include <zlib.h>
|
||||
|
||||
#if defined(_WIN64) && defined(__GNUC__)
|
||||
struct KNONVOLATILE_CONTEXT_POINTERS {
|
||||
union {
|
||||
PDWORD64 IntegerContext[16];
|
||||
struct {
|
||||
PDWORD64 Rax;
|
||||
PDWORD64 Rcx;
|
||||
PDWORD64 Rdx;
|
||||
PDWORD64 Rbx;
|
||||
PDWORD64 Rsp;
|
||||
PDWORD64 Rbp;
|
||||
PDWORD64 Rsi;
|
||||
PDWORD64 Rdi;
|
||||
PDWORD64 R8;
|
||||
PDWORD64 R9;
|
||||
PDWORD64 R10;
|
||||
PDWORD64 R11;
|
||||
PDWORD64 R12;
|
||||
PDWORD64 R13;
|
||||
PDWORD64 R14;
|
||||
PDWORD64 R15;
|
||||
};
|
||||
};
|
||||
};
|
||||
typedef
|
||||
EXCEPTION_DISPOSITION
|
||||
NTAPI
|
||||
EXCEPTION_ROUTINE (
|
||||
struct _EXCEPTION_RECORD *ExceptionRecord,
|
||||
PVOID EstablisherFrame,
|
||||
struct _CONTEXT *ContextRecord,
|
||||
PVOID DispatcherContext
|
||||
);
|
||||
NTSYSAPI
|
||||
EXCEPTION_ROUTINE *
|
||||
NTAPI
|
||||
RtlVirtualUnwind (
|
||||
DWORD HandlerType,
|
||||
DWORD64 ImageBase,
|
||||
DWORD64 ControlPc,
|
||||
PRUNTIME_FUNCTION FunctionEntry,
|
||||
PCONTEXT ContextRecord,
|
||||
PVOID *HandlerData,
|
||||
PDWORD64 EstablisherFrame,
|
||||
KNONVOLATILE_CONTEXT_POINTERS *ContextPointers
|
||||
);
|
||||
#endif
|
||||
|
||||
// MACROS ------------------------------------------------------------------
|
||||
|
||||
#define REMOTE_HOST "localhost"
|
||||
|
@ -1312,7 +1360,7 @@ static void StackWalk (HANDLE file, void *dumpaddress, DWORD *topOfStack, DWORD
|
|||
}
|
||||
// If we reach a RIP of zero, this means we've walked off the end of
|
||||
// the call stack and are done.
|
||||
if (context.Rip == NULL)
|
||||
if (context.Rip == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -388,8 +388,9 @@ FRawPS2Controller::~FRawPS2Controller()
|
|||
|
||||
bool FRawPS2Controller::ProcessInput(RAWHID *raw, int code)
|
||||
{
|
||||
// w32api has an incompatible definition of bRawData
|
||||
#if __GNUC__
|
||||
// w32api has an incompatible definition of bRawData.
|
||||
// (But the version that comes with MinGW64 is fine.)
|
||||
#if defined(__GNUC__) && !defined(_WIN64)
|
||||
BYTE *rawdata = &raw->bRawData;
|
||||
#else
|
||||
BYTE *rawdata = raw->bRawData;
|
||||
|
|
Loading…
Reference in a new issue