Misc warning fixes (removed unused variables)

This commit is contained in:
sirlemonhead 2019-11-14 10:27:34 +00:00 committed by Christoph Oelckers
parent 2f1a53e5c4
commit 7049070721
9 changed files with 9 additions and 45 deletions

View file

@ -37,11 +37,6 @@ void InitAnims()
void DestroyAnim(int nAnim) void DestroyAnim(int nAnim)
{ {
// if (nAnim == 386) {
if (nAnim == 365) {
int gasd = 123;
}
short nSprite = AnimList[nAnim].nSprite; short nSprite = AnimList[nAnim].nSprite;
if (nSprite >= 0) if (nSprite >= 0)
@ -58,25 +53,16 @@ void DestroyAnim(int nAnim)
int BuildAnim(int nSprite, int val, int val2, int x, int y, int z, int nSector, int nRepeat, int nFlag) int BuildAnim(int nSprite, int val, int val2, int x, int y, int z, int nSector, int nRepeat, int nFlag)
{ {
if (!nAnimsFree) if (!nAnimsFree) {
return -1; return -1;
}
if (nSector >= kMaxSectors) {
int asdffdg = 123;
}
nAnimsFree--; nAnimsFree--;
short nAnim = AnimsFree[nAnimsFree]; short nAnim = AnimsFree[nAnimsFree];
// if (nAnim == 386) {
if (nAnim == 365) {
int blag = 123;
}
if (nSprite == -1) { if (nSprite == -1) {
nSprite = insertsprite(nSector, 500); nSprite = insertsprite(nSector, 500);
// assert(nSprite != -1);
} }
sprite[nSprite].x = x; sprite[nSprite].x = x;

View file

@ -173,7 +173,7 @@ void FuncAnubis(int a, int nDamage, int nRun)
short nFrame = SeqBase[nSeq] + AnubisList[nAnubis].nFrame; short nFrame = SeqBase[nSeq] + AnubisList[nAnubis].nFrame;
short nFlag = FrameFlag[nFrame]; short nFlag = FrameFlag[nFrame];
int c; int c = 0;
if (nAction > 0 && nAction < 11) { if (nAction > 0 && nAction < 11) {
c = MoveCreatureWithCaution(nSprite); c = MoveCreatureWithCaution(nSprite);

View file

@ -2331,6 +2331,8 @@ int app_main(int argc, char const* const* argv)
if (pChar[1] == 'd' && pChar[2] == 'o' && pChar[3] == 'f' && pChar[4] == 'f') { if (pChar[1] == 'd' && pChar[2] == 'o' && pChar[3] == 'f' && pChar[4] == 'f') {
bNoCDCheck = kTrue; bNoCDCheck = kTrue;
} }
break;
} }
default: default:
{ {

View file

@ -258,7 +258,6 @@ int BuildFish(int nSprite, int x, int y, int z, int nSector, int nAngle)
void IdleFish(short nFish, short edx) void IdleFish(short nFish, short edx)
{ {
short nSprite = FishList[nFish].nSprite; short nSprite = FishList[nFish].nSprite;
short nAngle = sprite[nSprite].ang;
sprite[nSprite].ang += ((256 - RandomSize(9)) + 1024) & kAngleMask; sprite[nSprite].ang += ((256 - RandomSize(9)) + 1024) & kAngleMask;

View file

@ -57,6 +57,7 @@ int SectBelow[kMaxSectors] = { 0 };
uint8_t bIsVersion6 = kTrue; uint8_t bIsVersion6 = kTrue;
#if 0
// definitions for map version 6 structures // definitions for map version 6 structures
#pragma pack(1) #pragma pack(1)
@ -107,7 +108,7 @@ struct Sprite_6
static Sector_6 sector_6[1024]; static Sector_6 sector_6[1024];
static Wall_6 wall_6[8192]; static Wall_6 wall_6[8192];
static Sprite_6 sprite_6[4096]; static Sprite_6 sprite_6[4096];
#endif
uint8_t LoadLevel(int nMap) uint8_t LoadLevel(int nMap)
@ -639,10 +640,6 @@ void ProcessSpriteTag(short nSprite, short lotag, short hitag)
nLotag2 = 1; nLotag2 = 1;
} }
if (lotag > 1000) {
int blahgh = 123;
}
// this value can change in the below code but we also need to retain the original hitag value // this value can change in the below code but we also need to retain the original hitag value
int nVal = hitag; int nVal = hitag;

View file

@ -986,10 +986,6 @@ void MoveSector(short nSector, int nAngle, int *nXVel, int *nYVel)
} }
} }
//int var_1C = nAngle & kAngleMask;
int var_38 = yvect << 14;
int var_58 = xvect << 14;
for (i = headspritesect[nNextSector]; i != -1; i = nextspritesect[i]) for (i = headspritesect[nNextSector]; i != -1; i = nextspritesect[i])
{ {
if (sprite[i].statnum >= 99) if (sprite[i].statnum >= 99)
@ -1034,9 +1030,6 @@ void MoveSector(short nSector, int nAngle, int *nXVel, int *nYVel)
pBlockInfo->x += xvect; pBlockInfo->x += xvect;
pBlockInfo->y += yvect; pBlockInfo->y += yvect;
} }
else {
int gasd = 123;
}
// loc_163DD // loc_163DD
xvect <<= 14; xvect <<= 14;

View file

@ -383,9 +383,6 @@ void FuncMummy(int a, int nDamage, int nRun)
{ {
if (!RandomSize(3)) if (!RandomSize(3))
{ {
short a = nBullet >> 16;
short b = nBullet & 0xFFFF;
// FIXME CHECKME - nBullet & 0xFFFF can be -1. Original code doesn't handle this?? // FIXME CHECKME - nBullet & 0xFFFF can be -1. Original code doesn't handle this??
SetBulletEnemy(nBullet >> 16, nTarget); // isolate the bullet number (shift off the sprite index) SetBulletEnemy(nBullet >> 16, nTarget); // isolate the bullet number (shift off the sprite index)

View file

@ -2474,15 +2474,11 @@ void DoMovingSects()
if (sMoveDir[i] > 0) if (sMoveDir[i] > 0)
{ {
int thepoint = nTrailPointNext[sMoveSect[i].nTrailPoint]; sMoveSect[i].nTrailPoint = nTrailPointNext[sMoveSect[i].nTrailPoint];
sMoveSect[i].nTrailPoint = nTrailPointNext[sMoveSect[i].nTrailPoint];
} }
else else
{ {
int thepoint = nTrailPointPrev[sMoveSect[i].nTrailPoint];
sMoveSect[i].nTrailPoint = nTrailPointPrev[sMoveSect[i].nTrailPoint]; sMoveSect[i].nTrailPoint = nTrailPointPrev[sMoveSect[i].nTrailPoint];
} }
} }

View file

@ -1979,7 +1979,6 @@ do_default_b:
var_88 = 20; var_88 = 20;
int edx = 40; int edx = 40;
// int ecx = 1;
if (edx <= 0 || (!(var_30 & 2))) if (edx <= 0 || (!(var_30 & 2)))
{ {
@ -2053,7 +2052,6 @@ do_default_b:
case 7: // Blood Bowl case 7: // Blood Bowl
{ {
int edx = 160; int edx = 160;
int ecx = 1;
// Same code as case 6 now till break // Same code as case 6 now till break
if (edx <= 0 || (!(var_30 & 2))) if (edx <= 0 || (!(var_30 & 2)))
@ -3162,10 +3160,6 @@ do_default_b:
} }
else // else, player's health is less than 0 else // else, player's health is less than 0
{ {
if (buttons) {
int breakmehere = 1;
}
// loc_1C0E9 // loc_1C0E9
if (buttons & kButtonOpen) if (buttons & kButtonOpen)
{ {