- SW hit code abstraction.

This commit is contained in:
Christoph Oelckers 2021-10-30 00:06:24 +02:00
parent 077c4f19a7
commit 2a897c0582
2 changed files with 12 additions and 0 deletions

View file

@ -699,6 +699,10 @@ enum EHitBits
kHitSector = 0x4000, kHitSector = 0x4000,
kHitWall = 0x8000, kHitWall = 0x8000,
kHitSprite = 0xC000, kHitSprite = 0xC000,
kHitSky = 0x10000, // SW only
kHitFloor = 0x18000, // Exhumed only
kHitCeiling = 0x1c000, // Exhumed only
}; };
void updateModelInterpolation(); void updateModelInterpolation();

View file

@ -1055,6 +1055,7 @@ struct ROTATOR
}; };
using ROTATORp = ROTATOR*; using ROTATORp = ROTATOR*;
struct Collision;
// //
// User Extension record // User Extension record
@ -1075,6 +1076,8 @@ struct USER
memset(&WallP, 0, sizeof(USER) - myoffsetof(USER, WallP)); memset(&WallP, 0, sizeof(USER) - myoffsetof(USER, WallP));
} }
Collision hitCode() const;
// //
// Variables that can be used by actors and Player // Variables that can be used by actors and Player
// //
@ -2232,6 +2235,11 @@ DSWActor* PLAYERstruct::Actor()
{ {
return &swActors[PlayerSprite]; return &swActors[PlayerSprite];
} }
Collision USER::hitCode() const
{
return Collision(ret);
}
END_SW_NS END_SW_NS
#endif #endif