From b3fd642bf43907466895077a80c0d6e4fccfd74b Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Sun, 28 Jan 2018 04:30:34 +0000 Subject: [PATCH] Replace "INT16_32768" macro with unsigned literal "32768u". git-svn-id: https://svn.eduke32.com/eduke32@6600 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/build/include/build.h | 3 --- source/duke3d/src/game.cpp | 2 +- source/duke3d/src/gameexec.cpp | 4 ++-- source/duke3d/src/premap.cpp | 2 +- source/duke3d/src/sector.cpp | 2 +- 5 files changed, 5 insertions(+), 8 deletions(-) diff --git a/source/build/include/build.h b/source/build/include/build.h index eb91dc9c0..87b767e3f 100644 --- a/source/build/include/build.h +++ b/source/build/include/build.h @@ -317,9 +317,6 @@ enum { SPR_ALIGN_MASK = 32+16, }; -// compatibility token for bitfield uses of the most significant bit of signed int16_t -#define INT16_32768 ((int16_t)32768) - #include "buildtypes.h" #define UNTRACKED_STRUCTS #undef buildtypes_h__ diff --git a/source/duke3d/src/game.cpp b/source/duke3d/src/game.cpp index c4bb92c5b..f472fd925 100644 --- a/source/duke3d/src/game.cpp +++ b/source/duke3d/src/game.cpp @@ -3120,7 +3120,7 @@ int A_Spawn(int spriteNum, int tileNum) case SE_9_DOWN_OPEN_DOOR_LIGHTS: if (sector[sectNum].lotag && labs(sector[sectNum].ceilingz-pSprite->z) > 1024) - sector[sectNum].lotag |= INT16_32768; //If its open + sector[sectNum].lotag |= 32768u; //If its open fallthrough__; case SE_8_UP_OPEN_DOOR_LIGHTS: //First, get the ceiling-floor shade diff --git a/source/duke3d/src/gameexec.cpp b/source/duke3d/src/gameexec.cpp index 80c424335..afd154f25 100644 --- a/source/duke3d/src/gameexec.cpp +++ b/source/duke3d/src/gameexec.cpp @@ -261,7 +261,7 @@ static int32_t VM_CheckSquished(void) #endif if (vm.pSprite->pal == 1 ? - (floorZ - ceilZ >= ZOFFSET5 || (pSector->lotag & INT16_32768)) : + (floorZ - ceilZ >= ZOFFSET5 || (pSector->lotag & 32768u)) : (floorZ - ceilZ >= ZOFFSET4)) return 0; @@ -3692,7 +3692,7 @@ nullquote: if (foundSect >= 0 && isanearoperator(sector[foundSect].lotag)) if ((sector[foundSect].lotag&0xff) == ST_23_SWINGING_DOOR || sector[foundSect].floorz == sector[foundSect].ceilingz) - if ((sector[foundSect].lotag&(int16_t)(16384|INT16_32768)) == 0) + if ((sector[foundSect].lotag&(16384u|32768u)) == 0) { int32_t j; diff --git a/source/duke3d/src/premap.cpp b/source/duke3d/src/premap.cpp index dfa0e1e08..87ca213b9 100644 --- a/source/duke3d/src/premap.cpp +++ b/source/duke3d/src/premap.cpp @@ -1046,7 +1046,7 @@ static void prelevel(char g) case ST_20_CEILING_DOOR: case ST_22_SPLITTING_DOOR: if (sector[i].floorz > sector[i].ceilingz) - sector[i].lotag |= INT16_32768; + sector[i].lotag |= 32768u; continue; } diff --git a/source/duke3d/src/sector.cpp b/source/duke3d/src/sector.cpp index d783e5f7a..664cb9f9a 100644 --- a/source/duke3d/src/sector.cpp +++ b/source/duke3d/src/sector.cpp @@ -818,7 +818,7 @@ REDODOOR: if (j >= 0) j = sector[j].ceilingz; else { - pSector->lotag |= INT16_32768; + pSector->lotag |= 32768u; goto REDODOOR; } }