From d941203ab0d3c583700b8a91c2686ff89916a9e2 Mon Sep 17 00:00:00 2001 From: Braden Obrzut Date: Thu, 26 Jun 2014 20:37:11 -0400 Subject: [PATCH 1/5] - Fixed edward-san's typo. - Cleared a warning. --- src/sdl/i_system.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/sdl/i_system.cpp b/src/sdl/i_system.cpp index f7137d1036..88850d9fe1 100644 --- a/src/sdl/i_system.cpp +++ b/src/sdl/i_system.cpp @@ -103,10 +103,8 @@ int (*I_GetTime) (bool saveMS); int (*I_WaitForTic) (int); 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; @@ -323,8 +321,8 @@ void SetLanguageIDs () size_t langlen = strlen(language); DWORD lang = (langlen < 2 || langlen > 3) ? - MAKE_ID('e','n','u','0') : - MAKE_ID(language[0],language[1],language[2],'0'); + MAKE_ID('e','n','u','\0') : + MAKE_ID(language[0],language[1],language[2],'\0'); LanguageIDs[3] = LanguageIDs[2] = LanguageIDs[1] = LanguageIDs[0] = lang; } From e6d468eb3824266f2a068394a8edde2911c20584 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 28 Jun 2014 10:49:59 +0300 Subject: [PATCH 2/5] Use byte swapping functions from on OS X Remove inclusion of Core Foundation headers to avoid type conflicts with LZMA SDK. --- src/m_swap.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/m_swap.h b/src/m_swap.h index 6e0bc88cc5..82751fd471 100644 --- a/src/m_swap.h +++ b/src/m_swap.h @@ -29,51 +29,51 @@ // WAD files are stored little endian. #ifdef __APPLE__ -#include +#include inline short LittleShort(short x) { - return (short)CFSwapInt16LittleToHost((uint16_t)x); + return (short)OSSwapLittleToHostInt16((uint16_t)x); } inline unsigned short LittleShort(unsigned short x) { - return CFSwapInt16LittleToHost(x); + return OSSwapLittleToHostInt16(x); } inline short LittleShort(int x) { - return CFSwapInt16LittleToHost((uint16_t)x); + return OSSwapLittleToHostInt16((uint16_t)x); } inline int LittleLong(int x) { - return CFSwapInt32LittleToHost((uint32_t)x); + return OSSwapLittleToHostInt32((uint32_t)x); } inline unsigned int LittleLong(unsigned int x) { - return CFSwapInt32LittleToHost(x); + return OSSwapLittleToHostInt32(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) { - return CFSwapInt16BigToHost(x); + return OSSwapBigToHostInt16(x); } inline int BigLong(int x) { - return CFSwapInt32BigToHost((uint32_t)x); + return OSSwapBigToHostInt32((uint32_t)x); } inline unsigned int BigLong(unsigned int x) { - return CFSwapInt32BigToHost(x); + return OSSwapBigToHostInt32(x); } #else From 7b69c60af13235f8210644a6173bc3b9d038913d Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 28 Jun 2014 10:50:37 +0300 Subject: [PATCH 3/5] Use correct 'true' keyword --- src/sdl/i_main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sdl/i_main.cpp b/src/sdl/i_main.cpp index 3c721ae510..27324edf6b 100644 --- a/src/sdl/i_main.cpp +++ b/src/sdl/i_main.cpp @@ -303,8 +303,8 @@ int main (int argc, char **argv) vid_defwidth = videoInfo->current_w; vid_defheight = videoInfo->current_h; vid_defbits = videoInfo->vfmt->BitsPerPixel; - vid_vsync = True; - fullscreen = True; + vid_vsync = true; + fullscreen = true; } #endif // __APPLE__ From 65203760a841629f642c91d92103adbb554837bd Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 28 Jun 2014 10:52:26 +0300 Subject: [PATCH 4/5] Fix incorrect actor flag handling on big endian platforms --- src/thingdef/thingdef_properties.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/thingdef/thingdef_properties.cpp b/src/thingdef/thingdef_properties.cpp index 3b61bedcab..81452c7b00 100644 --- a/src/thingdef/thingdef_properties.cpp +++ b/src/thingdef/thingdef_properties.cpp @@ -167,7 +167,7 @@ INTBOOL CheckActorFlag(const AActor *owner, FFlagDef *fd) { return fd->flagbit & *(DWORD *)(((char*)owner) + fd->structoffset); } -#ifdef __BID_ENDIAN__ +#ifdef __BIG_ENDIAN__ else if (fd->fieldsize == 2) { return fd->flagbit & *(WORD *)(((char*)owner) + fd->structoffset); From 7d7f146ce1ed2edda1ef9f0a345ac6d5456ebdaf Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 28 Jun 2014 15:21:19 +0200 Subject: [PATCH 5/5] - fixed: transferring a translation to a missile needs to check if the missile was spawned successfully. --- src/thingdef/thingdef_codeptr.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index 9055f7b913..048d4d47ff 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -1340,14 +1340,11 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_FireCustomMissile) self->pitch -= pitch; AActor * misl=P_SpawnPlayerMissile (self, x, y, z, ti, shootangle, &linetarget); self->pitch = SavedPlayerPitch; - if (Flags & FPF_TRANSFERTRANSLATION) - { - misl->Translation = self->Translation; - } // automatic handling of seeker missiles if (misl) { + if (Flags & FPF_TRANSFERTRANSLATION) misl->Translation = self->Translation; if (linetarget && misl->flags2&MF2_SEEKERMISSILE) misl->tracer=linetarget; if (!(Flags & FPF_AIMATANGLE)) {