- SW: Tidy up function declarations where return type was on its own line.

This commit is contained in:
Mitchell Richters 2021-12-11 13:49:58 +11:00 committed by Christoph Oelckers
parent 1ee1c0c920
commit 65a55d3589
19 changed files with 241 additions and 482 deletions

View file

@ -345,8 +345,7 @@ void PreCachePachinko(int pal)
PreCacheRange(4840,4863, pal); PreCacheRange(4840,4863, pal);
} }
void void PreCacheActor(void)
PreCacheActor(void)
{ {
int pic; int pic;

View file

@ -34,8 +34,7 @@ BEGIN_SW_NS
int f_c = 3; int f_c = 3;
void void MapColors(int num, COLOR_MAP cm, int create, uint8_t *tempbuf)
MapColors(int num, COLOR_MAP cm, int create, uint8_t *tempbuf)
{ {
int i; int i;
float inc; float inc;

View file

@ -613,8 +613,7 @@ int InitCoolieCharge(DSWActor* actor)
} }
int int DoCoolieWaitBirth(DSWActor* actor)
DoCoolieWaitBirth(DSWActor* actor)
{ {
USER* u = actor->u(); USER* u = actor->u();

View file

@ -84,8 +84,7 @@ void SW_InitMultiPsky(void)
#if 1 #if 1
void void ShadeSprite(tspriteptr_t tsp)
ShadeSprite(tspriteptr_t tsp)
{ {
// set shade of sprite // set shade of sprite
tsp->shade = tsp->sector()->floorshade - 25; tsp->shade = tsp->sector()->floorshade - 25;
@ -259,8 +258,7 @@ int DoShadowFindGroundPoint(tspriteptr_t sp)
return loz; return loz;
} }
void void DoShadows(tspritetype* tsprite, int& spritesortcnt, tspriteptr_t tsp, int viewz, int camang)
DoShadows(tspritetype* tsprite, int& spritesortcnt, tspriteptr_t tsp, int viewz, int camang)
{ {
tspriteptr_t tSpr = &tsprite[spritesortcnt]; tspriteptr_t tSpr = &tsprite[spritesortcnt];
USERp tu = static_cast<DSWActor*>(tsp->ownerActor)->u(); USERp tu = static_cast<DSWActor*>(tsp->ownerActor)->u();
@ -357,8 +355,7 @@ DoShadows(tspritetype* tsprite, int& spritesortcnt, tspriteptr_t tsp, int viewz,
spritesortcnt++; spritesortcnt++;
} }
void void DoMotionBlur(tspritetype* tsprite, int& spritesortcnt, tspritetype const * const tsp)
DoMotionBlur(tspritetype* tsprite, int& spritesortcnt, tspritetype const * const tsp)
{ {
USERp tu = static_cast<DSWActor*>(tsp->ownerActor)->u(); USERp tu = static_cast<DSWActor*>(tsp->ownerActor)->u();
int nx,ny,nz = 0,dx,dy,dz; int nx,ny,nz = 0,dx,dy,dz;
@ -926,8 +923,7 @@ tspriteptr_t get_tsprite(tspritetype* tsprite, int& spritesortcnt, DSWActor* act
return nullptr; return nullptr;
} }
void void post_analyzesprites(tspritetype* tsprite, int& spritesortcnt)
post_analyzesprites(tspritetype* tsprite, int& spritesortcnt)
{ {
int tSpriteNum; int tSpriteNum;
USERp tu; USERp tu;
@ -967,8 +963,7 @@ post_analyzesprites(tspritetype* tsprite, int& spritesortcnt)
} }
#endif #endif
void void CircleCamera(int *nx, int *ny, int *nz, sectortype** vsect, binangle *nang, fixed_t q16horiz)
CircleCamera(int *nx, int *ny, int *nz, sectortype** vsect, binangle *nang, fixed_t q16horiz)
{ {
SPRITEp sp; SPRITEp sp;
HitInfo hit{}; HitInfo hit{};
@ -1252,8 +1247,7 @@ void CameraView(PLAYERp pp, int *tx, int *ty, int *tz, sectortype** tsect, binan
} }
} }
void void PreDraw(void)
PreDraw(void)
{ {
int i; int i;
PreDrawStackedWater(); PreDrawStackedWater();
@ -1265,8 +1259,7 @@ PreDraw(void)
} }
} }
void void PostDraw(void)
PostDraw(void)
{ {
int i; int i;
SWStatIterator it(STAT_FLOOR_SLOPE_DONT_DRAW); SWStatIterator it(STAT_FLOOR_SLOPE_DONT_DRAW);
@ -1429,8 +1422,7 @@ void RestorePortalState()
} }
} }
void void drawscreen(PLAYERp pp, double smoothratio)
drawscreen(PLAYERp pp, double smoothratio)
{ {
extern bool CameraTestMode; extern bool CameraTestMode;
int tx, ty, tz; int tx, ty, tz;

View file

@ -502,8 +502,7 @@ int DoHornetCircle(DSWActor* actor)
} }
int int DoHornetDeath(DSWActor* actor)
DoHornetDeath(DSWActor* actor)
{ {
USER* u = actor->u(); USER* u = actor->u();
SPRITEp sp = &actor->s(); SPRITEp sp = &actor->s();

View file

@ -41,14 +41,12 @@ void DoPlayerTurnTurret(PLAYERp pp, float avel);
static InputPacket loc; static InputPacket loc;
void void InitNetVars(void)
InitNetVars(void)
{ {
loc = {}; loc = {};
} }
void void InitTimingVars(void)
InitTimingVars(void)
{ {
PlayClock = 0; PlayClock = 0;
randomseed = 17L; randomseed = 17L;

View file

@ -337,8 +337,7 @@ void StopInventoryCloak(PLAYERp pp, short InventoryNum)
// //
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
void void DoPlayerNightVisionPalette(PLAYERp pp)
DoPlayerNightVisionPalette(PLAYERp pp)
{ {
if (pp != Player + screenpeek) return; if (pp != Player + screenpeek) return;
@ -361,8 +360,7 @@ DoPlayerNightVisionPalette(PLAYERp pp)
} }
} }
void void UseInventoryNightVision(PLAYERp pp)
UseInventoryNightVision(PLAYERp pp)
{ {
if (pp->InventoryActive[pp->InventoryNum]) if (pp->InventoryActive[pp->InventoryNum])
{ {
@ -379,8 +377,7 @@ UseInventoryNightVision(PLAYERp pp)
PlaySound(DIGI_NIGHTON, pp, v3df_dontpan|v3df_follow); PlaySound(DIGI_NIGHTON, pp, v3df_dontpan|v3df_follow);
} }
void void StopInventoryNightVision(PLAYERp pp, short InventoryNum)
StopInventoryNightVision(PLAYERp pp, short InventoryNum)
{ {
pp->InventoryActive[InventoryNum] = false; pp->InventoryActive[InventoryNum] = false;

View file

@ -76,8 +76,7 @@ extern ParentalStruct aVoxelArray[MAXTILES];
short short CheckTileSound(short picnum)
CheckTileSound(short picnum)
{ {
short sndnum = -1; short sndnum = -1;
@ -144,8 +143,7 @@ ANIMATOR GenerateDrips;
///////////////////////////////////////////////////// /////////////////////////////////////////////////////
// Initialize any of my special use sprites // Initialize any of my special use sprites
///////////////////////////////////////////////////// /////////////////////////////////////////////////////
void void JS_SpriteSetup(void)
JS_SpriteSetup(void)
{ {
SPRITEp sp; SPRITEp sp;
USERp u; USERp u;
@ -701,8 +699,7 @@ void GameInterface::LeavePortal(spritetype* viewer, int type)
} }
void void DoAutoSize(tspriteptr_t tspr)
DoAutoSize(tspriteptr_t tspr)
{ {
if (!bAutoSize) if (!bAutoSize)
return; return;
@ -851,8 +848,7 @@ DoAutoSize(tspriteptr_t tspr)
// Rotation angles for sprites // Rotation angles for sprites
short rotang = 0; short rotang = 0;
void void JAnalyzeSprites(tspriteptr_t tspr)
JAnalyzeSprites(tspriteptr_t tspr)
{ {
rotang += 4; rotang += 4;
if (rotang > 2047) if (rotang > 2047)

View file

@ -1570,8 +1570,7 @@ int PlayerInitFlashBomb(PLAYERp pp)
return 0; return 0;
} }
int int InitFlashBomb(DSWActor* actor)
InitFlashBomb(DSWActor* actor)
{ {
SPRITEp sp = &actor->s(); SPRITEp sp = &actor->s();
int i; int i;

View file

@ -553,8 +553,7 @@ STATE s_TrashCanPain[7] =
{TRASHCAN_PAIN_R0 + 6, TRASHCAN_PAIN_RATE, TrashCanPain, &s_TrashCanPain[0]} {TRASHCAN_PAIN_R0 + 6, TRASHCAN_PAIN_RATE, TrashCanPain, &s_TrashCanPain[0]}
}; };
int int SetupTrashCan(DSWActor* actor)
SetupTrashCan(DSWActor* actor)
{ {
SPRITEp sp = &actor->s(); SPRITEp sp = &actor->s();
USERp u; USERp u;
@ -659,8 +658,7 @@ STATE s_PachinkoLightOperate[] =
{PACHINKOLIGHT_R0 - 5, 12, PachinkoLightOperate, &s_PachinkoLightOperate[0]}, {PACHINKOLIGHT_R0 - 5, 12, PachinkoLightOperate, &s_PachinkoLightOperate[0]},
}; };
int int SetupPachinkoLight(DSWActor* actor)
SetupPachinkoLight(DSWActor* actor)
{ {
SPRITEp sp = &actor->s(); SPRITEp sp = &actor->s();
USERp u; USERp u;
@ -760,8 +758,7 @@ STATE s_Pachinko1Operate[] =
{PACHINKO1_R0 + 22, SF_QUICK_CALL, PachinkoCheckWin, &s_Pachinko1Stand[0]} {PACHINKO1_R0 + 22, SF_QUICK_CALL, PachinkoCheckWin, &s_Pachinko1Stand[0]}
}; };
int int SetupPachinko1(DSWActor* actor)
SetupPachinko1(DSWActor* actor)
{ {
SPRITEp sp = &actor->s(); SPRITEp sp = &actor->s();
USERp u; USERp u;
@ -931,8 +928,7 @@ STATE s_Pachinko2Operate[] =
{PACHINKO2_R0 + 22, SF_QUICK_CALL, PachinkoCheckWin, &s_Pachinko2Stand[0]} {PACHINKO2_R0 + 22, SF_QUICK_CALL, PachinkoCheckWin, &s_Pachinko2Stand[0]}
}; };
int int SetupPachinko2(DSWActor* actor)
SetupPachinko2(DSWActor* actor)
{ {
SPRITEp sp = &actor->s(); SPRITEp sp = &actor->s();
USERp u; USERp u;
@ -1015,8 +1011,7 @@ STATE s_Pachinko3Operate[] =
{PACHINKO3_R0 + 22, SF_QUICK_CALL, PachinkoCheckWin, &s_Pachinko3Stand[0]} {PACHINKO3_R0 + 22, SF_QUICK_CALL, PachinkoCheckWin, &s_Pachinko3Stand[0]}
}; };
int int SetupPachinko3(DSWActor* actor)
SetupPachinko3(DSWActor* actor)
{ {
SPRITEp sp = &actor->s(); SPRITEp sp = &actor->s();
USERp u; USERp u;
@ -1100,8 +1095,7 @@ STATE s_Pachinko4Operate[] =
{PACHINKO4_R0 + 22, SF_QUICK_CALL, PachinkoCheckWin, &s_Pachinko4Stand[0]} {PACHINKO4_R0 + 22, SF_QUICK_CALL, PachinkoCheckWin, &s_Pachinko4Stand[0]}
}; };
int int SetupPachinko4(DSWActor* actor)
SetupPachinko4(DSWActor* actor)
{ {
SPRITEp sp = &actor->s(); SPRITEp sp = &actor->s();
USERp u; USERp u;
@ -1428,8 +1422,7 @@ STATE s_MechanicGirlDrill[2] =
}; };
int int SetupMechanicGirl(DSWActor* actor)
SetupMechanicGirl(DSWActor* actor)
{ {
SPRITEp sp = &actor->s(); SPRITEp sp = &actor->s();
USERp u; USERp u;
@ -1852,8 +1845,7 @@ STATE s_PruneGirlPain[2] =
{PRUNEGIRL_PAIN_R0 + 0, 0|SF_QUICK_CALL, InitActorDecide, &s_PruneGirlPain[0]} {PRUNEGIRL_PAIN_R0 + 0, 0|SF_QUICK_CALL, InitActorDecide, &s_PruneGirlPain[0]}
}; };
int int SetupPruneGirl(DSWActor* actor)
SetupPruneGirl(DSWActor* actor)
{ {
SPRITEp sp = &actor->s(); SPRITEp sp = &actor->s();
USERp u; USERp u;

View file

@ -39,8 +39,7 @@ BEGIN_SW_NS
void ScaleSectorObject(SECTOR_OBJECTp); void ScaleSectorObject(SECTOR_OBJECTp);
short short DoSectorObjectSetScale(short match)
DoSectorObjectSetScale(short match)
{ {
SECTOR_OBJECTp sop; SECTOR_OBJECTp sop;
@ -112,8 +111,7 @@ DoSectorObjectSetScale(short match)
return 0; return 0;
} }
short short DoSOevent(short match, short state)
DoSOevent(short match, short state)
{ {
SECTOR_OBJECTp sop; SECTOR_OBJECTp sop;
SPRITEp me_sp; SPRITEp me_sp;
@ -296,8 +294,7 @@ void ScaleRandomPoint(SECTOR_OBJECTp sop, short k, short ang, int x, int y, int
// Morph point - move point around // Morph point - move point around
// //
void void MorphTornado(SECTOR_OBJECTp sop)
MorphTornado(SECTOR_OBJECTp sop)
{ {
int mx, my; int mx, my;
int ceilingz; int ceilingz;
@ -378,8 +375,7 @@ MorphTornado(SECTOR_OBJECTp sop)
} }
// moves center point around and aligns slope // moves center point around and aligns slope
void void MorphFloor(SECTOR_OBJECTp sop)
MorphFloor(SECTOR_OBJECTp sop)
{ {
int mx, my; int mx, my;
int floorz; int floorz;
@ -458,8 +454,7 @@ MorphFloor(SECTOR_OBJECTp sop)
} }
} }
void void SOBJ_AlignFloorToPoint(SECTOR_OBJECTp sop, int x, int y, int z)
SOBJ_AlignFloorToPoint(SECTOR_OBJECTp sop, int x, int y, int z)
{ {
SECTORp *sectp; SECTORp *sectp;
int j; int j;
@ -474,8 +469,7 @@ SOBJ_AlignFloorToPoint(SECTOR_OBJECTp sop, int x, int y, int z)
} }
} }
void void SOBJ_AlignCeilingToPoint(SECTOR_OBJECTp sop, int x, int y, int z)
SOBJ_AlignCeilingToPoint(SECTOR_OBJECTp sop, int x, int y, int z)
{ {
SECTORp *sectp; SECTORp *sectp;
int j; int j;
@ -490,8 +484,7 @@ SOBJ_AlignCeilingToPoint(SECTOR_OBJECTp sop, int x, int y, int z)
} }
} }
void void SOBJ_AlignFloorCeilingToPoint(SECTOR_OBJECTp sop, int x, int y, int z)
SOBJ_AlignFloorCeilingToPoint(SECTOR_OBJECTp sop, int x, int y, int z)
{ {
SECTORp *sectp; SECTORp *sectp;
int j; int j;
@ -508,8 +501,7 @@ SOBJ_AlignFloorCeilingToPoint(SECTOR_OBJECTp sop, int x, int y, int z)
} }
// moves center point around and aligns slope // moves center point around and aligns slope
void void SpikeFloor(SECTOR_OBJECTp sop)
SpikeFloor(SECTOR_OBJECTp sop)
{ {
int mx, my; int mx, my;
int floorz; int floorz;

View file

@ -59,8 +59,7 @@ double smoothratio;
// must start out as 0 // must start out as 0
void void InitNetPlayerOptions(void)
InitNetPlayerOptions(void)
{ {
// short pnum; // short pnum;
PLAYERp pp = Player + myconnectindex; PLAYERp pp = Player + myconnectindex;

View file

@ -1815,8 +1815,7 @@ ACTOR_ACTION_SET PlayerNinjaActionSet =
*/ */
int int SetupNinja(DSWActor* actor)
SetupNinja(DSWActor* actor)
{ {
SPRITEp sp = &actor->s(); SPRITEp sp = &actor->s();
USERp u; USERp u;

File diff suppressed because it is too large Load diff

View file

@ -57,8 +57,7 @@ void DoPlayerSectorUpdatePreMove(PLAYERp);
void DoPlayerSectorUpdatePostMove(PLAYERp); void DoPlayerSectorUpdatePostMove(PLAYERp);
void void InitPrediction(PLAYERp pp)
InitPrediction(PLAYERp pp)
{ {
if (!PredictionOn) if (!PredictionOn)
return; return;
@ -68,8 +67,7 @@ InitPrediction(PLAYERp pp)
PredictUser = *pp->Actor()->u(); PredictUser = *pp->Actor()->u();
} }
void void DoPrediction(PLAYERp ppp)
DoPrediction(PLAYERp ppp)
{ {
#if 0 #if 0
USERp u; USERp u;
@ -123,8 +121,7 @@ DoPrediction(PLAYERp ppp)
#endif #endif
} }
void void CorrectPrediction(int actualfifoplc)
CorrectPrediction(int actualfifoplc)
{ {
#if 0 #if 0
PREDICTp predict = &Predict[actualfifoplc & (MOVEFIFOSIZ-1)]; PREDICTp predict = &Predict[actualfifoplc & (MOVEFIFOSIZ-1)];

View file

@ -256,15 +256,13 @@ void SpawnQuake(sectortype* sect, int x, int y, int z,
PlaySound(DIGI_ERUPTION, actorNew, v3df_follow|v3df_dontpan); PlaySound(DIGI_ERUPTION, actorNew, v3df_follow|v3df_dontpan);
} }
bool bool SetQuake(PLAYERp pp, short tics, short amt)
SetQuake(PLAYERp pp, short tics, short amt)
{ {
SpawnQuake(pp->cursector, pp->posx, pp->posy, pp->posz, tics, amt, 30000); SpawnQuake(pp->cursector, pp->posx, pp->posy, pp->posz, tics, amt, 30000);
return false; return false;
} }
int int SetExpQuake(DSWActor* actor)
SetExpQuake(DSWActor* actor)
{ {
SPRITEp sp = &actor->s(); SPRITEp sp = &actor->s();
@ -272,8 +270,7 @@ SetExpQuake(DSWActor* actor)
return 0; return 0;
} }
int int SetGunQuake(DSWActor* actor)
SetGunQuake(DSWActor* actor)
{ {
SPRITEp sp = &actor->s(); SPRITEp sp = &actor->s();
@ -282,16 +279,14 @@ SetGunQuake(DSWActor* actor)
return 0; return 0;
} }
int int SetPlayerQuake(PLAYERp pp)
SetPlayerQuake(PLAYERp pp)
{ {
SpawnQuake(pp->cursector, pp->posx, pp->posy, pp->posz, 40, 8, 40000); SpawnQuake(pp->cursector, pp->posx, pp->posy, pp->posz, 40, 8, 40000);
return 0; return 0;
} }
int int SetNuclearQuake(DSWActor* actor)
SetNuclearQuake(DSWActor* actor)
{ {
SPRITEp sp = &actor->s(); SPRITEp sp = &actor->s();

View file

@ -581,8 +581,7 @@ void FAFgetzrangepoint(int32_t x, int32_t y, int32_t z, sectortype* const sect,
} }
} }
void void SetupMirrorTiles(void)
SetupMirrorTiles(void)
{ {
SPRITEp sp; SPRITEp sp;

View file

@ -4848,8 +4848,7 @@ int DoStayOnFloor(DSWActor* actor)
return 0; return 0;
} }
int int DoGrating(DSWActor* actor)
DoGrating(DSWActor* actor)
{ {
USER* u = actor->u(); USER* u = actor->u();
SPRITEp sp = &actor->s(); SPRITEp sp = &actor->s();
@ -5091,8 +5090,7 @@ int KillGetWeapon(DSWActor* actor)
return 0; return 0;
} }
int int DoSpawnItemTeleporterEffect(SPRITEp sp)
DoSpawnItemTeleporterEffect(SPRITEp sp)
{ {
extern STATE s_TeleportEffect[]; extern STATE s_TeleportEffect[];
SPRITEp ep; SPRITEp ep;
@ -6080,8 +6078,7 @@ void ProcessActiveVars(DSWActor* actor)
u->wait_active_check += ACTORMOVETICS; u->wait_active_check += ACTORMOVETICS;
} }
void void AdjustActiveRange(PLAYERp pp, DSWActor* actor, int dist)
AdjustActiveRange(PLAYERp pp, DSWActor* actor, int dist)
{ {
USERp u = actor->u(); USERp u = actor->u();
SPRITEp sp = &actor->s(); SPRITEp sp = &actor->s();
@ -6620,8 +6617,7 @@ int MissileWaterAdjust(DSWActor* actor)
return 0; return 0;
} }
int int MissileZrange(DSWActor* actor)
MissileZrange(DSWActor* actor)
{ {
USERp u = actor->u(); USERp u = actor->u();
SPRITEp sp = &actor->s(); SPRITEp sp = &actor->s();

View file

@ -19140,8 +19140,7 @@ void QueueGeneric(DSWActor* actor, short pic)
} }
#if 0 #if 0
int int DoShellShrap(DSWActor* actor)
DoShellShrap(DSWActor* actor)
{ {
SPRITEp sp = &actor->s(); SPRITEp sp = &actor->s();
USERp u = actor->u(); USERp u = actor->u();