mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 21:11:39 +00:00
Merge branch 'master' of https://github.com/rheit/zdoom
This commit is contained in:
commit
77277f4f75
5 changed files with 17 additions and 22 deletions
20
src/m_swap.h
20
src/m_swap.h
|
@ -29,51 +29,51 @@
|
||||||
// WAD files are stored little endian.
|
// WAD files are stored little endian.
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
#include <CoreFoundation/CoreFoundation.h>
|
#include <libkern/OSByteOrder.h>
|
||||||
|
|
||||||
inline short LittleShort(short x)
|
inline short LittleShort(short x)
|
||||||
{
|
{
|
||||||
return (short)CFSwapInt16LittleToHost((uint16_t)x);
|
return (short)OSSwapLittleToHostInt16((uint16_t)x);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline unsigned short LittleShort(unsigned short x)
|
inline unsigned short LittleShort(unsigned short x)
|
||||||
{
|
{
|
||||||
return CFSwapInt16LittleToHost(x);
|
return OSSwapLittleToHostInt16(x);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline short LittleShort(int x)
|
inline short LittleShort(int x)
|
||||||
{
|
{
|
||||||
return CFSwapInt16LittleToHost((uint16_t)x);
|
return OSSwapLittleToHostInt16((uint16_t)x);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline int LittleLong(int x)
|
inline int LittleLong(int x)
|
||||||
{
|
{
|
||||||
return CFSwapInt32LittleToHost((uint32_t)x);
|
return OSSwapLittleToHostInt32((uint32_t)x);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline unsigned int LittleLong(unsigned int x)
|
inline unsigned int LittleLong(unsigned int x)
|
||||||
{
|
{
|
||||||
return CFSwapInt32LittleToHost(x);
|
return OSSwapLittleToHostInt32(x);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline short BigShort(short x)
|
inline short BigShort(short x)
|
||||||
{
|
{
|
||||||
return (short)CFSwapInt16BigToHost((uint16_t)x);
|
return (short)OSSwapBigToHostInt16((uint16_t)x);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline unsigned short BigShort(unsigned short x)
|
inline unsigned short BigShort(unsigned short x)
|
||||||
{
|
{
|
||||||
return CFSwapInt16BigToHost(x);
|
return OSSwapBigToHostInt16(x);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline int BigLong(int x)
|
inline int BigLong(int x)
|
||||||
{
|
{
|
||||||
return CFSwapInt32BigToHost((uint32_t)x);
|
return OSSwapBigToHostInt32((uint32_t)x);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline unsigned int BigLong(unsigned int x)
|
inline unsigned int BigLong(unsigned int x)
|
||||||
{
|
{
|
||||||
return CFSwapInt32BigToHost(x);
|
return OSSwapBigToHostInt32(x);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -303,8 +303,8 @@ int main (int argc, char **argv)
|
||||||
vid_defwidth = videoInfo->current_w;
|
vid_defwidth = videoInfo->current_w;
|
||||||
vid_defheight = videoInfo->current_h;
|
vid_defheight = videoInfo->current_h;
|
||||||
vid_defbits = videoInfo->vfmt->BitsPerPixel;
|
vid_defbits = videoInfo->vfmt->BitsPerPixel;
|
||||||
vid_vsync = True;
|
vid_vsync = true;
|
||||||
fullscreen = True;
|
fullscreen = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // __APPLE__
|
#endif // __APPLE__
|
||||||
|
|
|
@ -103,10 +103,8 @@ int (*I_GetTime) (bool saveMS);
|
||||||
int (*I_WaitForTic) (int);
|
int (*I_WaitForTic) (int);
|
||||||
void (*I_FreezeTime) (bool frozen);
|
void (*I_FreezeTime) (bool frozen);
|
||||||
|
|
||||||
void I_Tactile (int on, int off, int total)
|
void I_Tactile (int /*on*/, int /*off*/, int /*total*/)
|
||||||
{
|
{
|
||||||
// UNUSED.
|
|
||||||
on = off = total = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ticcmd_t emptycmd;
|
ticcmd_t emptycmd;
|
||||||
|
@ -323,8 +321,8 @@ void SetLanguageIDs ()
|
||||||
size_t langlen = strlen(language);
|
size_t langlen = strlen(language);
|
||||||
|
|
||||||
DWORD lang = (langlen < 2 || langlen > 3) ?
|
DWORD lang = (langlen < 2 || langlen > 3) ?
|
||||||
MAKE_ID('e','n','u','0') :
|
MAKE_ID('e','n','u','\0') :
|
||||||
MAKE_ID(language[0],language[1],language[2],'0');
|
MAKE_ID(language[0],language[1],language[2],'\0');
|
||||||
|
|
||||||
LanguageIDs[3] = LanguageIDs[2] = LanguageIDs[1] = LanguageIDs[0] = lang;
|
LanguageIDs[3] = LanguageIDs[2] = LanguageIDs[1] = LanguageIDs[0] = lang;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1340,14 +1340,11 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FireCustomMissile)
|
||||||
self->pitch -= pitch;
|
self->pitch -= pitch;
|
||||||
AActor * misl=P_SpawnPlayerMissile (self, x, y, z, ti, shootangle, &linetarget);
|
AActor * misl=P_SpawnPlayerMissile (self, x, y, z, ti, shootangle, &linetarget);
|
||||||
self->pitch = SavedPlayerPitch;
|
self->pitch = SavedPlayerPitch;
|
||||||
if (Flags & FPF_TRANSFERTRANSLATION)
|
|
||||||
{
|
|
||||||
misl->Translation = self->Translation;
|
|
||||||
}
|
|
||||||
|
|
||||||
// automatic handling of seeker missiles
|
// automatic handling of seeker missiles
|
||||||
if (misl)
|
if (misl)
|
||||||
{
|
{
|
||||||
|
if (Flags & FPF_TRANSFERTRANSLATION) misl->Translation = self->Translation;
|
||||||
if (linetarget && misl->flags2&MF2_SEEKERMISSILE) misl->tracer=linetarget;
|
if (linetarget && misl->flags2&MF2_SEEKERMISSILE) misl->tracer=linetarget;
|
||||||
if (!(Flags & FPF_AIMATANGLE))
|
if (!(Flags & FPF_AIMATANGLE))
|
||||||
{
|
{
|
||||||
|
|
|
@ -167,7 +167,7 @@ INTBOOL CheckActorFlag(const AActor *owner, FFlagDef *fd)
|
||||||
{
|
{
|
||||||
return fd->flagbit & *(DWORD *)(((char*)owner) + fd->structoffset);
|
return fd->flagbit & *(DWORD *)(((char*)owner) + fd->structoffset);
|
||||||
}
|
}
|
||||||
#ifdef __BID_ENDIAN__
|
#ifdef __BIG_ENDIAN__
|
||||||
else if (fd->fieldsize == 2)
|
else if (fd->fieldsize == 2)
|
||||||
{
|
{
|
||||||
return fd->flagbit & *(WORD *)(((char*)owner) + fd->structoffset);
|
return fd->flagbit & *(WORD *)(((char*)owner) + fd->structoffset);
|
||||||
|
|
Loading…
Reference in a new issue