mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 06:53:40 +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
|
#pragma once
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _MSC_VER
|
#if defined(__GNUC__) && !defined(__forceinline)
|
||||||
#define __forceinline inline
|
#define __forceinline __inline__ __attribute__((always_inline))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static __forceinline SDWORD Scale (SDWORD a, SDWORD b, SDWORD c)
|
static __forceinline SDWORD Scale (SDWORD a, SDWORD b, SDWORD c)
|
||||||
|
|
|
@ -448,7 +448,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_MinotaurRoam)
|
||||||
{
|
{
|
||||||
// Turn
|
// Turn
|
||||||
if (pr_minotaurroam() & 1)
|
if (pr_minotaurroam() & 1)
|
||||||
self->movedir = (++self->movedir)%8;
|
self->movedir = (self->movedir + 1) % 8;
|
||||||
else
|
else
|
||||||
self->movedir = (self->movedir + 7) % 8;
|
self->movedir = (self->movedir + 7) % 8;
|
||||||
FaceMovementDirection (self);
|
FaceMovementDirection (self);
|
||||||
|
|
|
@ -72,7 +72,7 @@ void AFastProjectile::Tick ()
|
||||||
tm.LastRipped = NULL; // [RH] Do rip damage each step, like Hexen
|
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
|
{ // Blocked move
|
||||||
if (!(flags3 & MF3_SKYEXPLODE))
|
if (!(flags3 & MF3_SKYEXPLODE))
|
||||||
{
|
{
|
||||||
|
|
|
@ -512,12 +512,12 @@ bool P_Move (AActor *actor)
|
||||||
try_ok = true;
|
try_ok = true;
|
||||||
for(int i=1; i < steps; i++)
|
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;
|
if (!try_ok) break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// killough 3/15/98: don't jump over dropoffs:
|
// 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
|
// [GrafZahl] Interpolating monster movement as it is done here just looks bad
|
||||||
// so make it switchable
|
// so make it switchable
|
||||||
|
|
|
@ -4963,7 +4963,7 @@ bool P_CheckMissileSpawn (AActor* th)
|
||||||
bool MBFGrenade = (!(th->flags & MF_MISSILE) || (th->BounceFlags & BOUNCE_MBF));
|
bool MBFGrenade = (!(th->flags & MF_MISSILE) || (th->BounceFlags & BOUNCE_MBF));
|
||||||
|
|
||||||
// killough 3/15/98: no dropoff (really = don't care for missiles)
|
// 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
|
// [RH] Don't explode ripping missiles that spawn inside something
|
||||||
if (th->BlockingMobj == NULL || !(th->flags2 & MF2_RIP) || (th->BlockingMobj->flags5 & MF5_DONTRIP))
|
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
|
// check whether the move is ok
|
||||||
player->mo->height = FixedMul(defaultheight, player->crouchfactor);
|
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;
|
player->mo->height = savedheight;
|
||||||
if (direction > 0)
|
if (direction > 0)
|
||||||
|
|
|
@ -202,7 +202,7 @@ FPNGTexture::FPNGTexture (FileReader &lump, int lumpnum, const FString &filename
|
||||||
{
|
{
|
||||||
DWORD palette[256];
|
DWORD palette[256];
|
||||||
BYTE pngpal[256][3];
|
BYTE pngpal[256][3];
|
||||||
};
|
} p;
|
||||||
BYTE trans[256];
|
BYTE trans[256];
|
||||||
bool havetRNS = false;
|
bool havetRNS = false;
|
||||||
DWORD len, id;
|
DWORD len, id;
|
||||||
|
@ -260,14 +260,14 @@ FPNGTexture::FPNGTexture (FileReader &lump, int lumpnum, const FString &filename
|
||||||
|
|
||||||
case MAKE_ID('P','L','T','E'):
|
case MAKE_ID('P','L','T','E'):
|
||||||
PaletteSize = MIN<int> (len / 3, 256);
|
PaletteSize = MIN<int> (len / 3, 256);
|
||||||
lump.Read (pngpal, PaletteSize * 3);
|
lump.Read (p.pngpal, PaletteSize * 3);
|
||||||
if (PaletteSize * 3 != (int)len)
|
if (PaletteSize * 3 != (int)len)
|
||||||
{
|
{
|
||||||
lump.Seek (len - PaletteSize * 3, SEEK_CUR);
|
lump.Seek (len - PaletteSize * 3, SEEK_CUR);
|
||||||
}
|
}
|
||||||
for (i = PaletteSize - 1; i >= 0; --i)
|
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;
|
break;
|
||||||
|
|
||||||
|
@ -314,7 +314,7 @@ FPNGTexture::FPNGTexture (FileReader &lump, int lumpnum, const FString &filename
|
||||||
|
|
||||||
case 3: // Paletted
|
case 3: // Paletted
|
||||||
PaletteMap = new BYTE[PaletteSize];
|
PaletteMap = new BYTE[PaletteSize];
|
||||||
GPalette.MakeRemap (palette, PaletteMap, trans, PaletteSize);
|
GPalette.MakeRemap (p.palette, PaletteMap, trans, PaletteSize);
|
||||||
for (i = 0; i < PaletteSize; ++i)
|
for (i = 0; i < PaletteSize; ++i)
|
||||||
{
|
{
|
||||||
if (trans[i] == 0)
|
if (trans[i] == 0)
|
||||||
|
|
|
@ -69,6 +69,54 @@
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <zlib.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 ------------------------------------------------------------------
|
// MACROS ------------------------------------------------------------------
|
||||||
|
|
||||||
#define REMOTE_HOST "localhost"
|
#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
|
// If we reach a RIP of zero, this means we've walked off the end of
|
||||||
// the call stack and are done.
|
// the call stack and are done.
|
||||||
if (context.Rip == NULL)
|
if (context.Rip == 0)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -388,8 +388,9 @@ FRawPS2Controller::~FRawPS2Controller()
|
||||||
|
|
||||||
bool FRawPS2Controller::ProcessInput(RAWHID *raw, int code)
|
bool FRawPS2Controller::ProcessInput(RAWHID *raw, int code)
|
||||||
{
|
{
|
||||||
// w32api has an incompatible definition of bRawData
|
// w32api has an incompatible definition of bRawData.
|
||||||
#if __GNUC__
|
// (But the version that comes with MinGW64 is fine.)
|
||||||
|
#if defined(__GNUC__) && !defined(_WIN64)
|
||||||
BYTE *rawdata = &raw->bRawData;
|
BYTE *rawdata = &raw->bRawData;
|
||||||
#else
|
#else
|
||||||
BYTE *rawdata = raw->bRawData;
|
BYTE *rawdata = raw->bRawData;
|
||||||
|
|
Loading…
Reference in a new issue