- removed UNREFERENCED_PARAMETER macro.

Using C++ standard of not naming such parameters instead.
This commit is contained in:
Christoph Oelckers 2021-05-03 19:10:53 +02:00
parent 7d77b2315f
commit 0db8fc6163
9 changed files with 15 additions and 51 deletions

View file

@ -16,10 +16,6 @@
# define EXTERNC
#ifndef UNREFERENCED_PARAMETER
# define UNREFERENCED_PARAMETER(x) (x) = (x)
#endif
#if defined __GNUC__ || defined __clang__
# define ATTRIBUTE(attrlist) __attribute__(attrlist)
#else

View file

@ -26,11 +26,10 @@ static int32_t curextra=MAXTILES;
using namespace Polymost;
int32_t polymost_voxdraw(voxmodel_t* m, tspriteptr_t const tspr, bool rotate);
static int32_t addtileP(int32_t model,int32_t tile,int32_t pallet)
static int32_t addtileP(int32_t ,int32_t tile,int32_t pallet)
{
// tile >= 0 && tile < MAXTILES
UNREFERENCED_PARAMETER(model);
if (curextra==MAXTILES+EXTRATILES-1)
{
Printf("warning: max EXTRATILES reached\n");
@ -1108,7 +1107,7 @@ void md3_vox_calcmat_common(tspriteptr_t tspr, const vec3f_t *a0, float f, float
}
static void md3draw_handle_triangles(const md3surf_t *s, uint16_t *indexhandle,
int32_t texunits, const md3model_t *M)
int32_t , const md3model_t *M)
{
int32_t i;
@ -1130,10 +1129,6 @@ static void md3draw_handle_triangles(const md3surf_t *s, uint16_t *indexhandle,
}
}
GLInterface.Draw(DT_Triangles, data.second, s->numtris *3);
#ifndef USE_GLEXT
UNREFERENCED_PARAMETER(texunits);
#endif
}
static int32_t polymost_md3draw(md3model_t *m, tspriteptr_t tspr)

View file

@ -2637,10 +2637,8 @@ int actFloorBounceVector(int *x, int *y, int *z, int nSector, int a5)
return mulscale16r(t8, t);
}
void sub_2A620(int nSprite, int x, int y, int z, int nSector, int nDist, int a7, int a8, DAMAGE_TYPE a9, int a10, int a11, int a12, int a13)
void sub_2A620(int nSprite, int x, int y, int z, int nSector, int nDist, int a7, int a8, DAMAGE_TYPE a9, int a10, int a11, int , int )
{
UNREFERENCED_PARAMETER(a12);
UNREFERENCED_PARAMETER(a13);
uint8_t va0[(kMaxSectors+7)>>3];
int nOwner = sprite[nSprite].owner;
GetClosestSpriteSectors(nSector, x, y, nDist, va0);

View file

@ -418,7 +418,7 @@ void GameInterface::app_init()
HookReplaceFunctions();
Printf(PRINT_NONOTIFY, "Loading tiles\n");
if (!tileInit(0, NULL))
if (!tileInit())
I_FatalError("TILES###.ART files not found");
levelLoadDefaults();

View file

@ -261,9 +261,8 @@ void CFX::fxProcess(void)
}
}
void fxSpawnBlood(spritetype *pSprite, int a2)
void fxSpawnBlood(spritetype *pSprite, int )
{
UNREFERENCED_PARAMETER(a2);
if (pSprite->sectnum < 0 || pSprite->sectnum >= numsectors)
return;
int nSector = pSprite->sectnum;
@ -282,9 +281,8 @@ void fxSpawnBlood(spritetype *pSprite, int a2)
}
}
void sub_746D4(spritetype *pSprite, int a2)
void sub_746D4(spritetype *pSprite, int )
{
UNREFERENCED_PARAMETER(a2);
if (pSprite->sectnum < 0 || pSprite->sectnum >= numsectors)
return;
int nSector = pSprite->sectnum;

View file

@ -119,7 +119,7 @@ extern short voxelIndex[MAXTILES];
extern int nPrecacheCount;
int tileInit(char a1, const char *a2);
int tileInit();
void tilePrecacheTile(int nTile, int nType, int palette);
char tileGetSurfType(int hit);

View file

@ -2531,8 +2531,6 @@ void condError(XSPRITE* pXCond, const char* pzFormat, ...) {
bool condCheckMixed(XSPRITE* pXCond, EVENT event, int cmpOp, bool PUSH) {
UNREFERENCED_PARAMETER(PUSH);
//int var = -1;
int cond = pXCond->data1 - kCondMixedBase; int arg1 = pXCond->data2;
int arg2 = pXCond->data3; int arg3 = pXCond->data4;
@ -2811,8 +2809,6 @@ bool condCheckSector(XSPRITE* pXCond, int cmpOp, bool PUSH) {
bool condCheckWall(XSPRITE* pXCond, int cmpOp, bool PUSH) {
UNREFERENCED_PARAMETER(PUSH);
int var = -1;
int cond = pXCond->data1 - kCondWallBase; int arg1 = pXCond->data2;
int arg2 = pXCond->data3; //int arg3 = pXCond->data4;
@ -2928,8 +2924,6 @@ bool condCheckPlayer(XSPRITE* pXCond, int cmpOp, bool PUSH) {
bool condCheckDude(XSPRITE* pXCond, int cmpOp, bool PUSH) {
UNREFERENCED_PARAMETER(cmpOp);
int var = -1; //PLAYER* pPlayer = NULL;
int cond = pXCond->data1 - kCondDudeBase; int arg1 = pXCond->data2;
int arg2 = pXCond->data3; //int arg3 = pXCond->data4;
@ -3025,7 +3019,6 @@ bool condCheckDude(XSPRITE* pXCond, int cmpOp, bool PUSH) {
bool condCheckSprite(XSPRITE* pXCond, int cmpOp, bool PUSH) {
UNREFERENCED_PARAMETER(PUSH);
auto actor = &bloodActors[pXCond->reference];
int var = -1; PLAYER* pPlayer = NULL; bool retn = false;
int cond = pXCond->data1 - kCondSpriteBase; int arg1 = pXCond->data2;
@ -4092,8 +4085,7 @@ void seqTxSendCmdAll(XSPRITE* pXSource, int nIndex, COMMAND_ID cmd, bool modernS
void useRandomTx(XSPRITE* pXSource, COMMAND_ID cmd, bool setState) {
UNREFERENCED_PARAMETER(cmd);
spritetype* pSource = &sprite[pXSource->reference];
int tx = 0; int maxRetries = kMaxRandomizeRetries;

View file

@ -33,7 +33,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
BEGIN_BLD_NS
bool artLoaded = false;
int nTileFiles = 0;
int tileStart[256];
@ -44,14 +43,8 @@ char surfType[kMaxTiles];
int8_t tileShade[kMaxTiles];
short voxelIndex[kMaxTiles];
int tileInit(char a1, const char *a2)
int tileInit()
{
UNREFERENCED_PARAMETER(a1);
if (artLoaded)
return 1;
for (int i = 0; i < kMaxTiles; i++)
voxelIndex[i] = 0;
auto hFile = fileSystem.OpenFileReader("SURFACE.DAT");
if (hFile.isOpen())
{
@ -76,8 +69,6 @@ int tileInit(char a1, const char *a2)
if (voxelIndex[i] >= 0 && voxelIndex[i] < kMaxVoxels)
voxreserve.Set(voxelIndex[i]);
}
artLoaded = 1;
return 1;
}

View file

@ -1547,9 +1547,8 @@ void AltFireVoodoo(int nTrigger, PLAYER *pPlayer)
}
}
void DropVoodoo(int nTrigger, PLAYER *pPlayer)
void DropVoodoo(int , PLAYER *pPlayer)
{
UNREFERENCED_PARAMETER(nTrigger);
sfxPlay3DSound(pPlayer->pSprite, 455, 2, 0);
spritetype *pSprite = playerFireThing(pPlayer, 0, -4730, kThingVoodooHead, 0xccccc);
if (pSprite)
@ -1609,9 +1608,8 @@ void FireTesla(int nTrigger, PLAYER *pPlayer)
}
}
void AltFireTesla(int nTrigger, PLAYER *pPlayer)
void AltFireTesla(int , PLAYER *pPlayer)
{
UNREFERENCED_PARAMETER(nTrigger);
spritetype *pSprite = pPlayer->pSprite;
playerFireMissile(pPlayer, 0, pPlayer->aim.dx, pPlayer->aim.dy, pPlayer->aim.dz, kMissileTeslaAlt);
UseAmmo(pPlayer, pPlayer->weaponAmmo, 35);
@ -1639,9 +1637,8 @@ void FireNapalm(int nTrigger, PLAYER *pPlayer)
pPlayer->flashEffect = 1;
}
void FireNapalm2(int nTrigger, PLAYER *pPlayer)
void FireNapalm2(int , PLAYER *pPlayer)
{
UNREFERENCED_PARAMETER(nTrigger);
spritetype *pSprite = pPlayer->pSprite;
playerFireMissile(pPlayer, -120, pPlayer->aim.dx, pPlayer->aim.dy, pPlayer->aim.dz, kMissileFireballNapam);
playerFireMissile(pPlayer, 120, pPlayer->aim.dx, pPlayer->aim.dy, pPlayer->aim.dz, kMissileFireballNapam);
@ -1650,9 +1647,8 @@ void FireNapalm2(int nTrigger, PLAYER *pPlayer)
pPlayer->flashEffect = 1;
}
void AltFireNapalm(int nTrigger, PLAYER *pPlayer)
void AltFireNapalm(int , PLAYER *pPlayer)
{
UNREFERENCED_PARAMETER(nTrigger);
int nSpeed = MulScale(0x8000, 0x177777, 16)+0x66666;
spritetype *pMissile = playerFireThing(pPlayer, 0, -4730, kThingNapalmBall, nSpeed);
if (pMissile)
@ -1690,9 +1686,8 @@ void FireLifeLeech(int nTrigger, PLAYER *pPlayer)
pPlayer->visibility = ClipHigh(pPlayer->visibility+5, 50);
}
void AltFireLifeLeech(int nTrigger, PLAYER *pPlayer)
void AltFireLifeLeech(int , PLAYER *pPlayer)
{
UNREFERENCED_PARAMETER(nTrigger);
sfxPlay3DSound(pPlayer->pSprite, 455, 2, 0);
spritetype *pMissile = playerFireThing(pPlayer, 0, -4730, kThingDroppedLifeLeech, 0x19999);
if (pMissile)
@ -1725,9 +1720,8 @@ void AltFireLifeLeech(int nTrigger, PLAYER *pPlayer)
}
}
void FireBeast(int nTrigger, PLAYER * pPlayer)
void FireBeast(int , PLAYER * pPlayer)
{
UNREFERENCED_PARAMETER(nTrigger);
int r1 = Random2(2000);
int r2 = Random2(2000);
int r3 = Random2(2000);