diff --git a/source/blood/src/actor.cpp b/source/blood/src/actor.cpp index f71f763ae..54b718caa 100644 --- a/source/blood/src/actor.cpp +++ b/source/blood/src/actor.cpp @@ -5637,7 +5637,6 @@ void actProcessSprites(void) if ((hit&0xc000) != 0xc000 && (nObject < 0 || nObject >= 4096)) break; dassert(nObject >= 0 && nObject < kMaxSprites); - int UNUSED(nOwner) = actSpriteOwnerToSpriteId(pSprite); actExplodeSprite(pSprite); break; } diff --git a/source/blood/src/ai.cpp b/source/blood/src/ai.cpp index 34f6c419d..e47611954 100644 --- a/source/blood/src/ai.cpp +++ b/source/blood/src/ai.cpp @@ -137,7 +137,6 @@ bool CanMove(spritetype *pSprite, int a2, int nAngle, int nRange) if (!FindSector(x, y, z, &nSector)) return false; int floorZ = getflorzofslope(nSector, x, y); - int UNUSED(ceilZ) = getceilzofslope(nSector, x, y); int nXSector = sector[nSector].extra; char Underwater = 0; char Water = 0; char Depth = 0; char Crusher = 0; XSECTOR* pXSector = NULL; @@ -239,7 +238,6 @@ void aiChooseDirection(spritetype *pSprite, XSPRITE *pXSprite, int a3) int dx = xvel[nSprite]; int dy = yvel[nSprite]; int t1 = dmulscale30(dx, nCos, dy, nSin); - int UNUSED(t2) = dmulscale30(dx, nSin, -dy, nCos); int vsi = ((t1*15)>>12) / 2; int v8 = 341; if (vc < 0) @@ -1431,7 +1429,6 @@ void sub_5F15C(spritetype *pSprite, XSPRITE *pXSprite) DUDEINFO *pDudeInfo = getDudeInfo(pSprite2->type); if (nDist > pDudeInfo->seeDist && nDist > pDudeInfo->hearDist) continue; - int UNUSED(nAngle) = getangle(dx,dy); aiSetTarget(pXSprite, pSprite2->index); aiActivateDude(pSprite, pXSprite); return; diff --git a/source/blood/src/aibat.cpp b/source/blood/src/aibat.cpp index 972075cfb..3e2cd87c7 100644 --- a/source/blood/src/aibat.cpp +++ b/source/blood/src/aibat.cpp @@ -340,7 +340,6 @@ static void MoveForward(spritetype *pSprite, XSPRITE *pXSprite) pSprite->ang = (pSprite->ang+256)&2047; int dx = pXSprite->targetX-pSprite->x; int dy = pXSprite->targetY-pSprite->y; - int UNUSED(nAngle) = getangle(dx, dy); int nDist = approxDist(dx, dy); if ((unsigned int)Random(64) < 32 && nDist <= 0x200) return; @@ -374,7 +373,6 @@ static void MoveSwoop(spritetype *pSprite, XSPRITE *pXSprite) } int dx = pXSprite->targetX-pSprite->x; int dy = pXSprite->targetY-pSprite->y; - int UNUSED(nAngle) = getangle(dx, dy); int nDist = approxDist(dx, dy); if (Chance(0x600) && nDist <= 0x200) return; @@ -406,7 +404,6 @@ static void MoveFly(spritetype *pSprite, XSPRITE *pXSprite) } int dx = pXSprite->targetX-pSprite->x; int dy = pXSprite->targetY-pSprite->y; - int UNUSED(nAngle) = getangle(dx, dy); int nDist = approxDist(dx, dy); if (Chance(0x4000) && nDist <= 0x200) return; diff --git a/source/blood/src/aibeast.cpp b/source/blood/src/aibeast.cpp index 3384cb9b8..fa03a4a6e 100644 --- a/source/blood/src/aibeast.cpp +++ b/source/blood/src/aibeast.cpp @@ -440,7 +440,6 @@ static void thinkSwimChase(spritetype *pSprite, XSPRITE *pXSprite) if (nDist < pDudeInfo->seeDist && klabs(nDeltaAngle) <= pDudeInfo->periphery) { aiSetTarget(pXSprite, pXSprite->target); - int UNUSED(floorZ) = getflorzofslope(pSprite->sectnum, pSprite->x, pSprite->y); if (nDist < 0x400 && klabs(nDeltaAngle) < 85) aiNewState(pSprite, pXSprite, &beastSwimSlash); else @@ -470,7 +469,6 @@ static void MoveForward(spritetype *pSprite, XSPRITE *pXSprite) return; int dx = pXSprite->targetX-pSprite->x; int dy = pXSprite->targetY-pSprite->y; - int UNUSED(nAngle) = getangle(dx, dy); int nDist = approxDist(dx, dy); if (nDist <= 0x400 && Random(64) < 32) return; @@ -493,7 +491,6 @@ static void sub_628A0(spritetype *pSprite, XSPRITE *pXSprite) pSprite->ang = (pSprite->ang+256)&2047; int dx = pXSprite->targetX-pSprite->x; int dy = pXSprite->targetY-pSprite->y; - int UNUSED(nAngle) = getangle(dx, dy); int nDist = approxDist(dx, dy); if (Random(64) < 32 && nDist <= 0x400) return; @@ -531,7 +528,6 @@ static void sub_62AE0(spritetype *pSprite, XSPRITE *pXSprite) int dx = pXSprite->targetX-pSprite->x; int dy = pXSprite->targetY-pSprite->y; int dz = z2 - z; - int UNUSED(nAngle) = getangle(dx, dy); int nDist = approxDist(dx, dy); if (Chance(0x600) && nDist <= 0x400) return; @@ -567,7 +563,6 @@ static void sub_62D7C(spritetype *pSprite, XSPRITE *pXSprite) int dx = pXSprite->targetX-pSprite->x; int dy = pXSprite->targetY-pSprite->y; int dz = (z2 - z)<<3; - int UNUSED(nAngle) = getangle(dx, dy); int nDist = approxDist(dx, dy); if (Chance(0x4000) && nDist <= 0x400) return; diff --git a/source/blood/src/aiboneel.cpp b/source/blood/src/aiboneel.cpp index 4e98853f4..74c6c609a 100644 --- a/source/blood/src/aiboneel.cpp +++ b/source/blood/src/aiboneel.cpp @@ -351,7 +351,6 @@ static void MoveForward(spritetype *pSprite, XSPRITE *pXSprite) pSprite->ang = (pSprite->ang+256)&2047; int dx = pXSprite->targetX-pSprite->x; int dy = pXSprite->targetY-pSprite->y; - int UNUSED(nAngle) = getangle(dx, dy); int nDist = approxDist(dx, dy); if (nDist <= 0x399) return; @@ -382,7 +381,6 @@ static void MoveSwoop(spritetype *pSprite, XSPRITE *pXSprite) return; int dx = pXSprite->targetX-pSprite->x; int dy = pXSprite->targetY-pSprite->y; - int UNUSED(nAngle) = getangle(dx, dy); int nDist = approxDist(dx, dy); if (Chance(0x8000) && nDist <= 0x399) return; @@ -411,7 +409,6 @@ static void MoveAscend(spritetype *pSprite, XSPRITE *pXSprite) return; int dx = pXSprite->targetX-pSprite->x; int dy = pXSprite->targetY-pSprite->y; - int UNUSED(nAngle) = getangle(dx, dy); int nDist = approxDist(dx, dy); if (Chance(0x4000) && nDist <= 0x399) return; diff --git a/source/blood/src/aicaleb.cpp b/source/blood/src/aicaleb.cpp index 27bc9391f..015c97e69 100644 --- a/source/blood/src/aicaleb.cpp +++ b/source/blood/src/aicaleb.cpp @@ -307,7 +307,6 @@ static void thinkSwimChase(spritetype *pSprite, XSPRITE *pXSprite) if (nDist < pDudeInfo->seeDist && klabs(nDeltaAngle) <= pDudeInfo->periphery) { aiSetTarget(pXSprite, pXSprite->target); - int UNUSED(floorZ) = getflorzofslope(pSprite->sectnum, pSprite->x, pSprite->y); if (nDist < 0x400 && klabs(nDeltaAngle) < 85) aiNewState(pSprite, pXSprite, &tinycalebSwimAttack); else @@ -335,7 +334,6 @@ static void sub_65D04(spritetype *pSprite, XSPRITE *pXSprite) pSprite->ang = (pSprite->ang+256)&2047; int dx = pXSprite->targetX-pSprite->x; int dy = pXSprite->targetY-pSprite->y; - int UNUSED(nAngle) = getangle(dx, dy); int nDist = approxDist(dx, dy); if (Random(64) < 32 && nDist <= 0x400) return; @@ -373,7 +371,6 @@ static void sub_65F44(spritetype *pSprite, XSPRITE *pXSprite) int dx = pXSprite->targetX-pSprite->x; int dy = pXSprite->targetY-pSprite->y; int dz = z2 - z; - int UNUSED(nAngle) = getangle(dx, dy); int nDist = approxDist(dx, dy); if (Chance(0x600) && nDist <= 0x400) return; @@ -409,7 +406,6 @@ static void sub_661E0(spritetype *pSprite, XSPRITE *pXSprite) int dx = pXSprite->targetX-pSprite->x; int dy = pXSprite->targetY-pSprite->y; int dz = (z2 - z)<<3; - int UNUSED(nAngle) = getangle(dx, dy); int nDist = approxDist(dx, dy); if (Chance(0x4000) && nDist <= 0x400) return; diff --git a/source/blood/src/aigarg.cpp b/source/blood/src/aigarg.cpp index 95d0c6284..46820c7a2 100644 --- a/source/blood/src/aigarg.cpp +++ b/source/blood/src/aigarg.cpp @@ -138,8 +138,6 @@ static void BlastSSeqCallback(int, int nXSprite) int height = (pSprite->yrepeat*getDudeInfo(pSprite->type)->eyeHeight) << 2; int dx = pXSprite->targetX-pSprite->x; int dy = pXSprite->targetY-pSprite->y; - int UNUSED(nDist) = approxDist(dx, dy); - int UNUSED(nAngle) = getangle(dx, dy); int x = pSprite->x; int y = pSprite->y; int z = height; @@ -583,7 +581,6 @@ static void MoveForward(spritetype *pSprite, XSPRITE *pXSprite) pSprite->ang = (pSprite->ang+256)&2047; int dx = pXSprite->targetX-pSprite->x; int dy = pXSprite->targetY-pSprite->y; - int UNUSED(nAngle) = getangle(dx, dy); int nDist = approxDist(dx, dy); if ((unsigned int)Random(64) < 32 && nDist <= 0x400) return; @@ -621,7 +618,6 @@ static void MoveSlow(spritetype *pSprite, XSPRITE *pXSprite) } int dx = pXSprite->targetX-pSprite->x; int dy = pXSprite->targetY-pSprite->y; - int UNUSED(nAngle) = getangle(dx, dy); int nDist = approxDist(dx, dy); if (Chance(0x600) && nDist <= 0x400) return; @@ -665,7 +661,6 @@ static void MoveSwoop(spritetype *pSprite, XSPRITE *pXSprite) } int dx = pXSprite->targetX-pSprite->x; int dy = pXSprite->targetY-pSprite->y; - int UNUSED(nAngle) = getangle(dx, dy); int nDist = approxDist(dx, dy); if (Chance(0x600) && nDist <= 0x400) return; @@ -708,7 +703,6 @@ static void MoveFly(spritetype *pSprite, XSPRITE *pXSprite) } int dx = pXSprite->targetX-pSprite->x; int dy = pXSprite->targetY-pSprite->y; - int UNUSED(nAngle) = getangle(dx, dy); int nDist = approxDist(dx, dy); if (Chance(0x4000) && nDist <= 0x400) return; diff --git a/source/blood/src/aighost.cpp b/source/blood/src/aighost.cpp index 64cbd2097..ff1221bec 100644 --- a/source/blood/src/aighost.cpp +++ b/source/blood/src/aighost.cpp @@ -121,8 +121,6 @@ static void BlastSeqCallback(int, int nXSprite) int height = (pSprite->yrepeat*getDudeInfo(pSprite->type)->eyeHeight) << 2; int dx = pXSprite->targetX-pSprite->x; int dy = pXSprite->targetY-pSprite->y; - int UNUSED(nDist) = approxDist(dx, dy); - int UNUSED(nAngle) = getangle(dx, dy); int x = pSprite->x; int y = pSprite->y; int z = height; @@ -474,7 +472,6 @@ static void MoveForward(spritetype *pSprite, XSPRITE *pXSprite) pSprite->ang = (pSprite->ang+256)&2047; int dx = pXSprite->targetX-pSprite->x; int dy = pXSprite->targetY-pSprite->y; - int UNUSED(nAngle) = getangle(dx, dy); int nDist = approxDist(dx, dy); if ((unsigned int)Random(64) < 32 && nDist <= 0x400) return; @@ -512,7 +509,6 @@ static void MoveSlow(spritetype *pSprite, XSPRITE *pXSprite) } int dx = pXSprite->targetX-pSprite->x; int dy = pXSprite->targetY-pSprite->y; - int UNUSED(nAngle) = getangle(dx, dy); int nDist = approxDist(dx, dy); if (Chance(0x600) && nDist <= 0x400) return; @@ -553,7 +549,6 @@ static void MoveSwoop(spritetype *pSprite, XSPRITE *pXSprite) } int dx = pXSprite->targetX-pSprite->x; int dy = pXSprite->targetY-pSprite->y; - int UNUSED(nAngle) = getangle(dx, dy); int nDist = approxDist(dx, dy); if (Chance(0x600) && nDist <= 0x400) return; @@ -593,7 +588,6 @@ static void MoveFly(spritetype *pSprite, XSPRITE *pXSprite) } int dx = pXSprite->targetX-pSprite->x; int dy = pXSprite->targetY-pSprite->y; - int UNUSED(nAngle) = getangle(dx, dy); int nDist = approxDist(dx, dy); if (Chance(0x4000) && nDist <= 0x400) return; diff --git a/source/blood/src/aigilbst.cpp b/source/blood/src/aigilbst.cpp index d91a7affb..955838b43 100644 --- a/source/blood/src/aigilbst.cpp +++ b/source/blood/src/aigilbst.cpp @@ -294,7 +294,6 @@ static void thinkSwimChase(spritetype *pSprite, XSPRITE *pXSprite) if (nDist < pDudeInfo->seeDist && klabs(nDeltaAngle) <= pDudeInfo->periphery) { aiSetTarget(pXSprite, pXSprite->target); - int UNUSED(floorZ) = getflorzofslope(pSprite->sectnum, pSprite->x, pSprite->y); if (nDist < 0x400 && klabs(nDeltaAngle) < 85) aiNewState(pSprite, pXSprite, &gillBeastSwimBite); else @@ -327,7 +326,6 @@ static void sub_6CB00(spritetype *pSprite, XSPRITE *pXSprite) pSprite->ang = (pSprite->ang+256)&2047; int dx = pXSprite->targetX-pSprite->x; int dy = pXSprite->targetY-pSprite->y; - int UNUSED(nAngle) = getangle(dx, dy); int nDist = approxDist(dx, dy); if (Random(64) < 32 && nDist <= 0x400) return; @@ -365,7 +363,6 @@ static void sub_6CD74(spritetype *pSprite, XSPRITE *pXSprite) int dx = pXSprite->targetX-pSprite->x; int dy = pXSprite->targetY-pSprite->y; int dz = z2 - z; - int UNUSED(nAngle) = getangle(dx, dy); int nDist = approxDist(dx, dy); if (Chance(0x600) && nDist <= 0x400) return; @@ -401,7 +398,6 @@ static void sub_6D03C(spritetype *pSprite, XSPRITE *pXSprite) int dx = pXSprite->targetX-pSprite->x; int dy = pXSprite->targetY-pSprite->y; int dz = (z2 - z)<<3; - int UNUSED(nAngle) = getangle(dx, dy); int nDist = approxDist(dx, dy); if (Chance(0x4000) && nDist <= 0x400) return; diff --git a/source/blood/src/aiunicult.cpp b/source/blood/src/aiunicult.cpp index 30fe8e272..11eed6de6 100644 --- a/source/blood/src/aiunicult.cpp +++ b/source/blood/src/aiunicult.cpp @@ -991,8 +991,7 @@ void aiGenDudeMoveForward(spritetype* pSprite, XSPRITE* pXSprite ) { pSprite->ang = (pSprite->ang + 256) & 2047; int dx = pXSprite->targetX - pSprite->x; int dy = pXSprite->targetY - pSprite->y; - int UNUSED(nAngle) = getangle(dx, dy); - int nDist = approxDist(dx, dy); + int nDist = approxDist(dx, dy); if ((unsigned int)Random(64) < 32 && nDist <= 0x400) return; int nCos = Cos(pSprite->ang); diff --git a/source/blood/src/aizomba.cpp b/source/blood/src/aizomba.cpp index b1761d389..406413605 100644 --- a/source/blood/src/aizomba.cpp +++ b/source/blood/src/aizomba.cpp @@ -86,7 +86,6 @@ static void HackSeqCallback(int, int nXSprite) DUDEINFO *pDudeInfoT = getDudeInfo(pTarget->type); int tx = pXSprite->targetX-pSprite->x; int ty = pXSprite->targetY-pSprite->y; - int UNUSED(nDist) = approxDist(tx, ty); int nAngle = getangle(tx, ty); int height = (pSprite->yrepeat*pDudeInfo->eyeHeight)<<2; int height2 = (pTarget->yrepeat*pDudeInfoT->eyeHeight)<<2; diff --git a/source/blood/src/aizombf.cpp b/source/blood/src/aizombf.cpp index 94ce95593..ee6ae307a 100644 --- a/source/blood/src/aizombf.cpp +++ b/source/blood/src/aizombf.cpp @@ -95,7 +95,6 @@ static void PukeSeqCallback(int, int nXSprite) int height2 = (pDudeInfoT->eyeHeight*pTarget->yrepeat); int tx = pXSprite->targetX-pSprite->x; int ty = pXSprite->targetY-pSprite->y; - int UNUSED(nDist) = approxDist(tx, ty); int nAngle = getangle(tx, ty); int dx = Cos(nAngle)>>16; int dy = Sin(nAngle)>>16; diff --git a/source/blood/src/osdcmd.cpp b/source/blood/src/osdcmd.cpp index 41754ce10..611f74f12 100644 --- a/source/blood/src/osdcmd.cpp +++ b/source/blood/src/osdcmd.cpp @@ -130,9 +130,8 @@ static int osdcmd_give(CCmdFuncPtr parm) return CCMD_SHOWHELP; } -static int osdcmd_god(CCmdFuncPtr UNUSED(parm)) +static int osdcmd_god(CCmdFuncPtr) { - UNREFERENCED_CONST_PARAMETER(parm); if (numplayers == 1 && gamestate == GS_LEVEL) { SetGodMode(!gMe->godMode); @@ -144,10 +143,8 @@ static int osdcmd_god(CCmdFuncPtr UNUSED(parm)) return CCMD_OK; } -static int osdcmd_noclip(CCmdFuncPtr UNUSED(parm)) +static int osdcmd_noclip(CCmdFuncPtr) { - UNREFERENCED_CONST_PARAMETER(parm); - if (numplayers == 1 && gamestate == GS_LEVEL) { SetClipMode(!gNoClip); diff --git a/source/blood/src/weapon.cpp b/source/blood/src/weapon.cpp index 76cd93f5a..e64a95841 100644 --- a/source/blood/src/weapon.cpp +++ b/source/blood/src/weapon.cpp @@ -1579,7 +1579,6 @@ void FireNapalm2(int nTrigger, PLAYER *pPlayer) void AltFireNapalm(int nTrigger, PLAYER *pPlayer) { UNREFERENCED_PARAMETER(nTrigger); - char UNUSED(bAkimbo) = powerupCheck(pPlayer, kPwUpTwoGuns); int nSpeed = mulscale16(0x8000, 0x177777)+0x66666; spritetype *pMissile = playerFireThing(pPlayer, 0, -4730, kThingNapalmBall, nSpeed); if (pMissile)