Silence some more compiler warnings

This commit is contained in:
sirlemonhead 2019-12-02 15:15:45 +00:00 committed by Christoph Oelckers
parent c4b9137ee1
commit 2e28647e31
7 changed files with 31 additions and 45 deletions

View file

@ -143,7 +143,7 @@ void BuildBlood(int x, int y, int z, short nSector)
BuildAnim(-1, kSeqFish, 36, x, y, z, nSector, 75, 128);
}
void FuncFishLimb(int a, int nDamage, int nRun)
void FuncFishLimb(int a, int UNUSED(nDamage), int nRun)
{
short nFish = RunData[nRun].nVal;
short nSprite = FishChunk[nFish].nSprite;

View file

@ -844,8 +844,6 @@ loc_flag:
int var_50 = (fix16_to_int(sPlayerInput[nPlayer].horizon) - 92) << 2;
nHeight -= var_50;
short thetargetthin = sPlayerInput[nPlayer].nTarget;
if (sPlayerInput[nPlayer].nTarget >= 0)
{
assert(sprite[sPlayerInput[nPlayer].nTarget].sectnum < kMaxSectors);

View file

@ -425,23 +425,19 @@ void FuncLion(int a, int nDamage, int nRun)
int var_40 = 0x7FFFFFFF;
short nSector = sprite[nSprite].sectnum;
short var_28 = sprite[nSprite].ang;
short nAng = (sprite[nSprite].ang - 512) & kAngleMask;
for (int i = 0; i < 5; i++)
{
short hitsect, hitwall, hitsprite;
int hitx, hity, hitz;
short hitwall;
int hitx, hity;
vec3_t startPos = { x, y, z };
hitdata_t hitData;
hitscan(&startPos, sprite[nSprite].sectnum, Sin(nAng + 512), Sin(nAng), 0, &hitData, CLIPMASK1);
hitx = hitData.pos.x;
hity = hitData.pos.y;
hitz = hitData.pos.z;
hitsprite = hitData.sprite;
hitsect = hitData.sect;
hitwall = hitData.wall;
if (hitwall > -1)

View file

@ -2306,7 +2306,8 @@ void DoLastLevelCinema()
int ebp = esi;
ebp -= nString;
ebp = 81 - (ebp <<= 2);
ebp <<= 2;
ebp = 81 - ebp;
int var_1C = esi - nString;

View file

@ -567,7 +567,7 @@ void StartElevSound(short nSprite, int nVal)
D3PlayFX(StaticSound[nSound], nSprite);
}
void FuncElev(int a, int b, int nRun)
void FuncElev(int a, int UNUSED(b), int nRun)
{
short nElev = RunData[nRun].nVal;
assert(nElev >= 0 && nElev < kMaxElevs);
@ -575,8 +575,6 @@ void FuncElev(int a, int b, int nRun)
short nChannel = Elevator[nElev].nChannel;
short var_18 = Elevator[nElev].field_0;
RunChannel *pRunChannel = &sRunChannels[nChannel];
assert(nChannel >= 0 && nChannel < kMaxChannels);
int nMessage = a & 0x7F0000;
@ -825,8 +823,7 @@ int BuildWallFace(short nChannel, short nWall, short nCount, ...)
return WallFaceCount | 0x70000;
}
// Confirmed 100% correct with original .exe
void FuncWallFace(int a, int b, int nRun)
void FuncWallFace(int a, int UNUSED(b), int nRun)
{
int nWallFace = RunData[nRun].nVal;
assert(nWallFace >= 0 && nWallFace < kMaxWallFace);
@ -985,9 +982,9 @@ int BuildSlide(int nChannel, int edx, int ebx, int ecx, int arg1, int arg2, int
return nSlide | 0x80000;
}
void FuncSlide(int a, int b, int c)
void FuncSlide(int a, int UNUSED(b), int nRun)
{
int nSlide = RunData[c].nVal;
int nSlide = RunData[nRun].nVal;
assert(nSlide >= 0 && nSlide < kMaxSlides);
short nChannel = SlideData2[nSlide].nChannel;
@ -1012,7 +1009,7 @@ void FuncSlide(int a, int b, int c)
return;
}
SlideData2[nSlide].field_4 = runlist_AddRunRec(NewRun, RunData[c].nMoves);
SlideData2[nSlide].field_4 = runlist_AddRunRec(NewRun, RunData[nRun].nMoves);
if (SlideData2[nSlide].field_8 != sRunChannels[nChannel].c)
{
@ -1232,7 +1229,7 @@ int BuildTrap(int nSprite, int edx, int ebx, int ecx)
}
}
void FuncTrap(int a, int b, int nRun)
void FuncTrap(int a, int UNUSED(b), int nRun)
{
short nTrap = RunData[nRun].nVal;
short nSprite = sTrap[nTrap].nSprite;
@ -1421,7 +1418,7 @@ int BuildSpark(int nSprite, int nVal)
return var_14;
}
void FuncSpark(int a, int b, int nRun)
void FuncSpark(int a, int UNUSED(b), int nRun)
{
int nSprite = RunData[nRun].nVal;
assert(nSprite >= 0 && nSprite < kMaxSprites);

View file

@ -317,23 +317,23 @@ void FuncRex(int a, int nDamage, int nRun)
switch ((nVal & 0xC000))
{
case 0xc000:
if ((nVal & 0x3FFF) == nTarget)
{
PlotCourseToSprite(nSprite, nTarget);
RexList[nRex].nAction = 4;
case 0xc000:
if ((nVal & 0x3FFF) == nTarget)
{
PlotCourseToSprite(nSprite, nTarget);
RexList[nRex].nAction = 4;
RexList[nRex].field_2 = 0;
break;
}
fallthrough__;
case 0x8000:
sprite[nSprite].ang = (sprite[nSprite].ang + 256) & kAngleMask;
sprite[nSprite].xvel = Cos(sprite[nSprite].ang) >> 2;
sprite[nSprite].yvel = Sin(sprite[nSprite].ang) >> 2;
RexList[nRex].nAction = 1;
RexList[nRex].field_2 = 0;
nAction = 1;
break;
}
fallthrough__;
case 0x8000:
sprite[nSprite].ang = (sprite[nSprite].ang + 256) & kAngleMask;
sprite[nSprite].xvel = Cos(sprite[nSprite].ang) >> 2;
sprite[nSprite].yvel = Sin(sprite[nSprite].ang) >> 2;
RexList[nRex].nAction = 1;
RexList[nRex].field_2 = 0;
nAction = 1;
break;
}
}

View file

@ -439,14 +439,10 @@ void runlist_ReadyChannel(short eax)
void runlist_ProcessChannels()
{
#if 1
short v0; // di@1
short v1; // si@1
short *v2; // ebx@3
short v3; // cx@3
short v4; // cx@5
int v5; // eax@11
int result; // eax@13
short b; // [sp+0h] [bp-1Ch]@3
short v0;
short v1;
int v5;
short b;
short d;
do
@ -496,7 +492,6 @@ void runlist_ProcessChannels()
}
ChannelList = b;
}
result = v1;
ChannelList = v1;
} while (v1 != -1);
@ -603,7 +598,6 @@ void runlist_ProcessSectorTag(int nSector, int lotag, int hitag)
int nChannel = runlist_AllocChannel(hitag % 1000);
assert(nChannel >= 0); // REMOVE
int var_2C = 1000;
int var_24 = (hitag / 1000) << 12;
int var_18 = lotag / 1000;