- formatting the rest of break.cpp

This commit is contained in:
Christoph Oelckers 2022-09-04 22:29:14 +02:00
parent 0644add7be
commit 19e703aaed

View file

@ -643,13 +643,19 @@ int AutoBreakWall(walltype* wallp, const DVector3& hit_pos, DAngle ang, int type
else else
{ {
wallp->picnum = break_info->breaknum; wallp->picnum = break_info->breaknum;
if ((int16_t)wallp->hitag < 0) if (wallp->hitag < 0)
DoWallBreakSpriteMatch(wallp->hitag); DoWallBreakSpriteMatch(wallp->hitag);
} }
} }
return true; return true;
} }
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
bool UserBreakWall(walltype* wp) bool UserBreakWall(walltype* wp)
{ {
int match = wp->hitag; int match = wp->hitag;
@ -737,6 +743,12 @@ bool UserBreakWall(walltype* wp)
return false; return false;
} }
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
int WallBreakPosition(walltype* wp, sectortype** sectp, DVector3& pos, DAngle& ang) int WallBreakPosition(walltype* wp, sectortype** sectp, DVector3& pos, DAngle& ang)
{ {
int nx,ny; int nx,ny;
@ -787,7 +799,12 @@ int WallBreakPosition(walltype* wp, sectortype** sectp, DVector3& pos, DAngle& a
return true; return true;
} }
//---------------------------------------------------------------------------
//
// If the tough parameter is not set, then it can't break tough walls and sprites // If the tough parameter is not set, then it can't break tough walls and sprites
//
//---------------------------------------------------------------------------
bool HitBreakWall(walltype* wp, DVector3 hitpos, DAngle ang, int type) bool HitBreakWall(walltype* wp, DVector3 hitpos, DAngle ang, int type)
{ {
int match = wp->hitag; int match = wp->hitag;
@ -808,9 +825,11 @@ bool HitBreakWall(walltype* wp, DVector3 hitpos, DAngle ang, int type)
return true; return true;
} }
//---------------------------------------------------------------------------
// //
// SPRITE //
// //
//---------------------------------------------------------------------------
int KillBreakSprite(DSWActor* breakActor) int KillBreakSprite(DSWActor* breakActor)
{ {
@ -844,6 +863,11 @@ int KillBreakSprite(DSWActor* breakActor)
return 0; return 0;
} }
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
int UserBreakSprite(DSWActor* breakActor) int UserBreakSprite(DSWActor* breakActor)
{ {
@ -915,6 +939,12 @@ int UserBreakSprite(DSWActor* breakActor)
return false; return false;
} }
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
int AutoBreakSprite(DSWActor* breakActor, int type) int AutoBreakSprite(DSWActor* breakActor, int type)
{ {
BREAK_INFO* break_info; BREAK_INFO* break_info;
@ -980,6 +1010,12 @@ int AutoBreakSprite(DSWActor* breakActor, int type)
return false; return false;
} }
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
bool NullActor(DSWActor* actor) bool NullActor(DSWActor* actor)
{ {
// a Null Actor is defined as an actor that has no real controlling programming attached // a Null Actor is defined as an actor that has no real controlling programming attached
@ -999,6 +1035,12 @@ bool NullActor(DSWActor* actor)
return false; return false;
} }
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
int HitBreakSprite(DSWActor* breakActor, int type) int HitBreakSprite(DSWActor* breakActor, int type)
{ {
if (TEST_BOOL1(breakActor)) if (TEST_BOOL1(breakActor))
@ -1023,6 +1065,12 @@ int HitBreakSprite(DSWActor* breakActor, int type)
return AutoBreakSprite(breakActor, type); return AutoBreakSprite(breakActor, type);
} }
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
void DoWallBreakMatch(int match) void DoWallBreakMatch(int match)
{ {
sectortype* sect = nullptr; sectortype* sect = nullptr;
@ -1041,6 +1089,12 @@ void DoWallBreakMatch(int match)
} }
} }
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
static void DoWallBreakSpriteMatch(int match) static void DoWallBreakSpriteMatch(int match)
{ {
SWStatIterator it(STAT_ENEMY); SWStatIterator it(STAT_ENEMY);
@ -1052,4 +1106,5 @@ static void DoWallBreakSpriteMatch(int match)
} }
} }
} }
END_SW_NS END_SW_NS