mirror of
https://github.com/Ragora/T2-CPP.git
synced 2026-07-15 18:24:33 +00:00
* Implement type masking.
This commit is contained in:
parent
0410000234
commit
99a5aa550e
2 changed files with 37 additions and 1 deletions
|
|
@ -6,6 +6,40 @@
|
||||||
|
|
||||||
namespace DX
|
namespace DX
|
||||||
{
|
{
|
||||||
|
//! All type masks used in the engine.
|
||||||
|
enum class TypeMasks : unsigned int
|
||||||
|
{
|
||||||
|
StaticObjectType = 1,
|
||||||
|
EnvironmentObjectType = 2,
|
||||||
|
TerrainObjectType = 4,
|
||||||
|
InteriorObjectType = 8,
|
||||||
|
WaterObjectType = 0x10,
|
||||||
|
TriggerObjectType = 0x40,
|
||||||
|
MarkerObjectType = 0x40,
|
||||||
|
ForceFieldObjectType = 0x100,
|
||||||
|
GameBaseObjectType = 0x400,
|
||||||
|
ShapeBaseObjectType = 0x800,
|
||||||
|
CameraObjectType = 0x1000,
|
||||||
|
StaticShapeObjectType = 0x2000,
|
||||||
|
PlayerObjectType = 0x4000,
|
||||||
|
ItemObjectType = 0x8000,
|
||||||
|
VehicleObjectType = 0x10000,
|
||||||
|
VehicleBlockerObject = 0x20000,
|
||||||
|
ProjectileObjectType = 0x40000,
|
||||||
|
ExplosionObjectType = 0x80000,
|
||||||
|
CorpseObjectType = 0x100000,
|
||||||
|
TurretObjectType = 0x200000,
|
||||||
|
DebrisObjectType = 0x400000,
|
||||||
|
PhysicalZoneObjectType = 0x800000,
|
||||||
|
StatocTSObjectType = 0x1000000,
|
||||||
|
GuiControlObjectType = 0x2000000,
|
||||||
|
StaticRenderedObjectType = 0x4000000,
|
||||||
|
DamagableItemObjectType = 0x8000000,
|
||||||
|
SensorObjectType = 0x10000000,
|
||||||
|
StationObjectType = 0x20000000,
|
||||||
|
GeneratorObjectType = 0x40000000
|
||||||
|
};
|
||||||
|
|
||||||
class SimObject
|
class SimObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
@ -19,6 +53,7 @@ namespace DX
|
||||||
const unsigned int &identifier;
|
const unsigned int &identifier;
|
||||||
const unsigned int base_pointer_value;
|
const unsigned int base_pointer_value;
|
||||||
const unsigned int &dataBlock;
|
const unsigned int &dataBlock;
|
||||||
|
const TypeMasks &type;
|
||||||
|
|
||||||
char& mName;
|
char& mName;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,8 @@ namespace DX
|
||||||
fieldDictionary(MEMBER_FIELD(obj, unsigned int, 0x2C)),
|
fieldDictionary(MEMBER_FIELD(obj, unsigned int, 0x2C)),
|
||||||
dataBlock(MEMBER_FIELD(obj, unsigned int, 0x248)),
|
dataBlock(MEMBER_FIELD(obj, unsigned int, 0x248)),
|
||||||
base_pointer_value(MEMBER_FIELD(obj, unsigned int, 0)),
|
base_pointer_value(MEMBER_FIELD(obj, unsigned int, 0)),
|
||||||
mName(MEMBER_FIELD(obj, char, 4))
|
mName(MEMBER_FIELD(obj, char, 4)),
|
||||||
|
type(MEMBER_FIELD(obj, TypeMasks, 0x28))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue