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); 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 nFish = RunData[nRun].nVal;
short nSprite = FishChunk[nFish].nSprite; short nSprite = FishChunk[nFish].nSprite;

View file

@ -844,8 +844,6 @@ loc_flag:
int var_50 = (fix16_to_int(sPlayerInput[nPlayer].horizon) - 92) << 2; int var_50 = (fix16_to_int(sPlayerInput[nPlayer].horizon) - 92) << 2;
nHeight -= var_50; nHeight -= var_50;
short thetargetthin = sPlayerInput[nPlayer].nTarget;
if (sPlayerInput[nPlayer].nTarget >= 0) if (sPlayerInput[nPlayer].nTarget >= 0)
{ {
assert(sprite[sPlayerInput[nPlayer].nTarget].sectnum < kMaxSectors); 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; int var_40 = 0x7FFFFFFF;
short nSector = sprite[nSprite].sectnum;
short var_28 = sprite[nSprite].ang; short var_28 = sprite[nSprite].ang;
short nAng = (sprite[nSprite].ang - 512) & kAngleMask; short nAng = (sprite[nSprite].ang - 512) & kAngleMask;
for (int i = 0; i < 5; i++) for (int i = 0; i < 5; i++)
{ {
short hitsect, hitwall, hitsprite; short hitwall;
int hitx, hity, hitz; int hitx, hity;
vec3_t startPos = { x, y, z }; vec3_t startPos = { x, y, z };
hitdata_t hitData; hitdata_t hitData;
hitscan(&startPos, sprite[nSprite].sectnum, Sin(nAng + 512), Sin(nAng), 0, &hitData, CLIPMASK1); hitscan(&startPos, sprite[nSprite].sectnum, Sin(nAng + 512), Sin(nAng), 0, &hitData, CLIPMASK1);
hitx = hitData.pos.x; hitx = hitData.pos.x;
hity = hitData.pos.y; hity = hitData.pos.y;
hitz = hitData.pos.z;
hitsprite = hitData.sprite;
hitsect = hitData.sect;
hitwall = hitData.wall; hitwall = hitData.wall;
if (hitwall > -1) if (hitwall > -1)

View file

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

View file

@ -567,7 +567,7 @@ void StartElevSound(short nSprite, int nVal)
D3PlayFX(StaticSound[nSound], nSprite); 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; short nElev = RunData[nRun].nVal;
assert(nElev >= 0 && nElev < kMaxElevs); assert(nElev >= 0 && nElev < kMaxElevs);
@ -575,8 +575,6 @@ void FuncElev(int a, int b, int nRun)
short nChannel = Elevator[nElev].nChannel; short nChannel = Elevator[nElev].nChannel;
short var_18 = Elevator[nElev].field_0; short var_18 = Elevator[nElev].field_0;
RunChannel *pRunChannel = &sRunChannels[nChannel];
assert(nChannel >= 0 && nChannel < kMaxChannels); assert(nChannel >= 0 && nChannel < kMaxChannels);
int nMessage = a & 0x7F0000; int nMessage = a & 0x7F0000;
@ -825,8 +823,7 @@ int BuildWallFace(short nChannel, short nWall, short nCount, ...)
return WallFaceCount | 0x70000; return WallFaceCount | 0x70000;
} }
// Confirmed 100% correct with original .exe void FuncWallFace(int a, int UNUSED(b), int nRun)
void FuncWallFace(int a, int b, int nRun)
{ {
int nWallFace = RunData[nRun].nVal; int nWallFace = RunData[nRun].nVal;
assert(nWallFace >= 0 && nWallFace < kMaxWallFace); 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; 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); assert(nSlide >= 0 && nSlide < kMaxSlides);
short nChannel = SlideData2[nSlide].nChannel; short nChannel = SlideData2[nSlide].nChannel;
@ -1012,7 +1009,7 @@ void FuncSlide(int a, int b, int c)
return; 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) 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 nTrap = RunData[nRun].nVal;
short nSprite = sTrap[nTrap].nSprite; short nSprite = sTrap[nTrap].nSprite;
@ -1421,7 +1418,7 @@ int BuildSpark(int nSprite, int nVal)
return var_14; 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; int nSprite = RunData[nRun].nVal;
assert(nSprite >= 0 && nSprite < kMaxSprites); assert(nSprite >= 0 && nSprite < kMaxSprites);

View file

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