- 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);
}
void
PreCacheActor(void)
void PreCacheActor(void)
{
int pic;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1815,8 +1815,7 @@ ACTOR_ACTION_SET PlayerNinjaActionSet =
*/
int
SetupNinja(DSWActor* actor)
int SetupNinja(DSWActor* actor)
{
SPRITEp sp = &actor->s();
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
InitPrediction(PLAYERp pp)
void InitPrediction(PLAYERp pp)
{
if (!PredictionOn)
return;
@ -68,8 +67,7 @@ InitPrediction(PLAYERp pp)
PredictUser = *pp->Actor()->u();
}
void
DoPrediction(PLAYERp ppp)
void DoPrediction(PLAYERp ppp)
{
#if 0
USERp u;
@ -123,8 +121,7 @@ DoPrediction(PLAYERp ppp)
#endif
}
void
CorrectPrediction(int actualfifoplc)
void CorrectPrediction(int actualfifoplc)
{
#if 0
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);
}
bool
SetQuake(PLAYERp pp, short tics, short amt)
bool SetQuake(PLAYERp pp, short tics, short amt)
{
SpawnQuake(pp->cursector, pp->posx, pp->posy, pp->posz, tics, amt, 30000);
return false;
}
int
SetExpQuake(DSWActor* actor)
int SetExpQuake(DSWActor* actor)
{
SPRITEp sp = &actor->s();
@ -272,8 +270,7 @@ SetExpQuake(DSWActor* actor)
return 0;
}
int
SetGunQuake(DSWActor* actor)
int SetGunQuake(DSWActor* actor)
{
SPRITEp sp = &actor->s();
@ -282,16 +279,14 @@ SetGunQuake(DSWActor* actor)
return 0;
}
int
SetPlayerQuake(PLAYERp pp)
int SetPlayerQuake(PLAYERp pp)
{
SpawnQuake(pp->cursector, pp->posx, pp->posy, pp->posz, 40, 8, 40000);
return 0;
}
int
SetNuclearQuake(DSWActor* actor)
int SetNuclearQuake(DSWActor* actor)
{
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
SetupMirrorTiles(void)
void SetupMirrorTiles(void)
{
SPRITEp sp;

View file

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

View file

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