- eliminated walltype aliases.

This commit is contained in:
Christoph Oelckers 2021-12-31 15:41:39 +01:00
parent 72962cc098
commit 98492aae54
11 changed files with 24 additions and 25 deletions

View file

@ -466,7 +466,7 @@ void SortBreakInfo(void)
qsort(&WallBreakInfo, SIZ(WallBreakInfo), sizeof(BREAK_INFO), CompareBreakInfo);
}
BREAK_INFO* SetupWallForBreak(WALLp wallp)
BREAK_INFO* SetupWallForBreak(walltype* wallp)
{
BREAK_INFO* break_info;
@ -548,10 +548,10 @@ DSWActor* FindBreakSpriteMatch(int match)
// WALL
//
int AutoBreakWall(WALLp wallp, int hit_x, int hit_y, int hit_z, int ang, int type)
int AutoBreakWall(walltype* wallp, int hit_x, int hit_y, int hit_z, int ang, int type)
{
BREAK_INFO* break_info;
WALLp nwp;
walltype* nwp;
wallp->lotag = 0;
if (wallp->twoSided())
@ -637,7 +637,7 @@ int AutoBreakWall(WALLp wallp, int hit_x, int hit_y, int hit_z, int ang, int typ
return true;
}
bool UserBreakWall(WALLp wp)
bool UserBreakWall(walltype* wp)
{
int match = wp->hitag;
const auto block_flags = CSTAT_WALL_BLOCK|CSTAT_WALL_BLOCK_HITSCAN;
@ -782,7 +782,7 @@ int WallBreakPosition(walltype* wp, sectortype** sectp, int *x, int *y, int *z,
}
// If the tough parameter is not set, then it can't break tough walls and sprites
bool HitBreakWall(WALLp wp, int hit_x, int hit_y, int hit_z, int ang, int type)
bool HitBreakWall(walltype* wp, int hit_x, int hit_y, int hit_z, int ang, int type)
{
int match = wp->hitag;

View file

@ -48,9 +48,9 @@ struct BREAK_INFO
BREAK_INFO* FindWallBreakInfo(int picnum);
BREAK_INFO* FindSpriteBreakInfo(int picnum);
void SortBreakInfo(void);
BREAK_INFO* SetupWallForBreak(WALLp wallp);
BREAK_INFO* SetupWallForBreak(walltype* wallp);
BREAK_INFO* SetupSpriteForBreak(DSWActor* actor);
bool HitBreakWall(WALLp wp, int, int, int, int ang, int type);
bool HitBreakWall(walltype* wp, int, int, int, int ang, int type);
bool CheckBreakToughness(BREAK_INFO* break_info, int ID);
int WallBreakPosition(walltype* wp, sectortype** sectp, int* x, int* y, int* z, int* ang);
void SortBreakInfo(void);

View file

@ -73,7 +73,7 @@ void precacheMap(void)
int i;
int j;
SECTORp sectp;
WALLp wp;
walltype* wp;
for(auto& sec: sector)
{

View file

@ -395,7 +395,6 @@ typedef pANIMATOR *pANIMATORp;
typedef void (*soANIMATORp) (SECTOR_OBJECTp);
typedef sectortype SECTOR, *SECTORp;
typedef walltype WALL, *WALLp;
struct STATE
{
@ -928,7 +927,7 @@ struct USER
// wall vars for lighting
TArray<int8_t> WallShade;
WALLp WallP; // operate on wall instead of sprite
walltype* WallP; // operate on wall instead of sprite
STATEp State;
STATEp *Rot;
STATEp StateStart;

View file

@ -413,7 +413,7 @@ int DoBloodSpray(DSWActor* actor)
case kHitWall:
{
short hit_wall, nw, wall_ang;
WALLp wph;
walltype* wph;
short wb;
wph = actor->user.coll.hitWall;
@ -610,7 +610,7 @@ int DoPhosphorus(DSWActor* actor)
case kHitWall:
{
short hit_wall, nw, wall_ang;
WALLp wph;
walltype* wph;
wph = actor->user.coll.hitWall;

View file

@ -2510,7 +2510,7 @@ void DoPlayerMoveVehicle(PLAYERp pp)
SECTORp *sectp;
SECTOR_OBJECTp sop = pp->sop;
WALLp wp;
walltype* wp;
int j,k;
short startwall,endwall;

View file

@ -112,7 +112,7 @@ void SetSectorWallBits(sectortype* sect, int bit_mask, bool set_sectwall, bool s
void WallSetupDontMove(void)
{
WALLp wallp;
walltype* wallp;
SWStatIterator it(STAT_WALL_DONT_MOVE_UPPER);
while (auto iActor = it.Next())
@ -134,7 +134,7 @@ void WallSetupDontMove(void)
}
}
static void WallSetupLoop(WALLp wp, int16_t lotag, int16_t extra)
static void WallSetupLoop(walltype* wp, int16_t lotag, int16_t extra)
{
// set first wall
{
@ -2374,7 +2374,7 @@ void DoSineWaveFloor(void)
if ((flags & SINE_SLOPED))
{
WALLp wal;
walltype* wal;
if (sect->wallnum == 4)
{
//Set wal to the wall on the opposite side of the sector
@ -2588,7 +2588,7 @@ void DoPanning(void)
int nx, ny;
int i;
SECTORp sectp;
WALLp wallp;
walltype* wallp;
SWStatIterator it(STAT_FLOOR_PAN);
while (auto actor = it.Next())

View file

@ -1961,7 +1961,7 @@ SECTOR_OBJECTp DetectSectorObject(SECTORp sectph)
return nullptr;
}
SECTOR_OBJECTp DetectSectorObjectByWall(WALLp wph)
SECTOR_OBJECTp DetectSectorObjectByWall(walltype* wph)
{
SECTOR_OBJECTp sop;

View file

@ -36,12 +36,12 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms
BEGIN_SW_NS
SECTOR_OBJECTp DetectSectorObjectByWall(WALLp);
SECTOR_OBJECTp DetectSectorObjectByWall(walltype*);
void SOwallmove(SECTOR_OBJECTp sop, DSWActor* actor, WALLp find_wallp, int dist, int *nx, int *ny)
void SOwallmove(SECTOR_OBJECTp sop, DSWActor* actor, walltype* find_wallp, int dist, int *nx, int *ny)
{
int j,k,wallcount;
WALLp wp;
walltype* wp;
short startwall,endwall;
SECTORp *sectp;

View file

@ -7427,7 +7427,7 @@ int DoStar(DSWActor* actor)
case kHitWall:
{
short nw,wall_ang;
WALLp wph;
walltype* wph;
wph = actor->user.coll.hitWall;
@ -8269,7 +8269,7 @@ int DoGrenade(DSWActor* actor)
case kHitWall:
{
short nw,wall_ang;
WALLp wph;
walltype* wph;
wph = actor->user.coll.hitWall;
@ -8471,7 +8471,7 @@ int DoVulcanBoulder(DSWActor* actor)
case kHitWall:
{
short nw,wall_ang;
WALLp wph;
walltype* wph;
wph = actor->user.coll.hitWall;

View file

@ -82,7 +82,7 @@ extern TObjPtr<DSWActor*> LoWangsQueue[MAX_LOWANGS_QUEUE];
void ChangeState(DSWActor* actor, STATEp statep);
void DoPlayerBeginRecoil(PLAYERp pp, short pix_amt);
SECTOR_OBJECTp DetectSectorObject(SECTORp);
SECTOR_OBJECTp DetectSectorObjectByWall(WALLp);
SECTOR_OBJECTp DetectSectorObjectByWall(walltype*);
void ScaleSpriteVector(DSWActor* actor, int scale);
void QueueHole(sectortype* hit_sect, walltype* hit_wall, int hit_x, int hit_y, int hit_z);
DSWActor* QueueWallBlood(DSWActor* hit, short ang);