2022-10-09 05:13:17 +00:00
|
|
|
#ifndef _CMATERIALLIST
|
|
|
|
#define _CMATERIALLIST
|
2022-08-13 01:26:00 +00:00
|
|
|
|
|
|
|
#include "types.h"
|
|
|
|
|
|
|
|
enum EMaterialTypes {
|
|
|
|
kMT_NoStepLogic = 0,
|
|
|
|
kMT_Stone = 1,
|
|
|
|
kMT_Metal = 2,
|
|
|
|
kMT_Grass = 3,
|
|
|
|
kMT_Ice = 4,
|
|
|
|
kMT_Pillar = 5,
|
|
|
|
kMT_MetalGrating = 6,
|
|
|
|
kMT_Phazon = 7,
|
|
|
|
kMT_Dirt = 8,
|
|
|
|
kMT_Lava = 9,
|
|
|
|
kMT_LavaStone = 10,
|
|
|
|
kMT_Snow = 11,
|
|
|
|
kMT_MudSlow = 12,
|
|
|
|
kMT_HalfPipe = 13,
|
|
|
|
kMT_Mud = 14,
|
|
|
|
kMT_Glass = 15,
|
|
|
|
kMT_Shield = 16,
|
|
|
|
kMT_Sand = 17,
|
|
|
|
kMT_ProjectilePassthrough = 18,
|
|
|
|
kMT_Solid = 19,
|
|
|
|
kMT_NoPlatformCollision = 20,
|
|
|
|
kMT_CameraPassthrough = 21,
|
|
|
|
kMT_Wood = 22,
|
|
|
|
kMT_Organic = 23,
|
|
|
|
kMT_NoEdgeCollision = 24,
|
|
|
|
kMT_RedundantEdgeOrFlippedTri = 25,
|
|
|
|
kMT_SeeThrough = 26,
|
|
|
|
kMT_ScanPassthrough = 27,
|
|
|
|
kMT_AIPassthrough = 28,
|
|
|
|
kMT_Ceiling = 29,
|
|
|
|
kMT_Wall = 30,
|
|
|
|
kMT_Floor = 31,
|
|
|
|
kMT_Player = 32,
|
|
|
|
kMT_Character = 33,
|
|
|
|
kMT_Trigger = 34,
|
|
|
|
kMT_Projectile = 35,
|
|
|
|
kMT_Bomb = 36,
|
|
|
|
kMT_GroundCollider = 37,
|
|
|
|
kMT_NoStaticCollision = 38,
|
|
|
|
kMT_Scannable = 39,
|
|
|
|
kMT_Target = 40,
|
|
|
|
kMT_Orbit = 41,
|
|
|
|
kMT_Occluder = 42,
|
|
|
|
kMT_Immovable = 43,
|
|
|
|
kMT_Debris = 44,
|
|
|
|
kMT_PowerBomb = 45,
|
|
|
|
kMT_Unknown46 = 46,
|
|
|
|
kMT_CollisionActor = 47,
|
|
|
|
kMT_AIBlock = 48,
|
|
|
|
kMT_Platform = 49,
|
|
|
|
kMT_NonSolidDamageable = 50,
|
|
|
|
kMT_RadarObject = 51,
|
|
|
|
kMT_PlatformSlave = 52,
|
|
|
|
kMT_AIJoint = 53,
|
|
|
|
kMT_Unknown54 = 54,
|
|
|
|
kMT_SolidCharacter = 55,
|
|
|
|
kMT_ExcludeFromLineOfSightTest = 56,
|
|
|
|
kMT_ExcludeFromRadar = 57,
|
|
|
|
kMT_NoPlayerCollision = 58,
|
|
|
|
kMT_SixtyThree = 63
|
|
|
|
};
|
|
|
|
|
|
|
|
// TODO: how else would they end up in .data?
|
|
|
|
static EMaterialTypes SolidMaterial = kMT_Solid;
|
|
|
|
|
|
|
|
class CMaterialList {
|
|
|
|
public:
|
|
|
|
CMaterialList() : value(0) {}
|
2022-09-29 23:55:38 +00:00
|
|
|
CMaterialList(const EMaterialTypes& m1) : value(0) { Add(m1); }
|
2022-09-18 05:55:13 +00:00
|
|
|
CMaterialList(const EMaterialTypes& m1, const EMaterialTypes& m2) : value(0) {
|
2022-09-29 23:55:38 +00:00
|
|
|
Add(m1);
|
|
|
|
Add(m2);
|
2022-09-18 05:55:13 +00:00
|
|
|
}
|
|
|
|
CMaterialList(const EMaterialTypes& m1, const EMaterialTypes& m2, const EMaterialTypes& m3)
|
|
|
|
: value(0) {
|
2022-09-29 23:55:38 +00:00
|
|
|
Add(m1);
|
|
|
|
Add(m2);
|
|
|
|
Add(m3);
|
2022-09-18 05:55:13 +00:00
|
|
|
}
|
|
|
|
CMaterialList(const EMaterialTypes& m1, const EMaterialTypes& m2, const EMaterialTypes& m3,
|
|
|
|
const EMaterialTypes& m4)
|
|
|
|
: value(0) {
|
2022-09-29 23:55:38 +00:00
|
|
|
Add(m1);
|
|
|
|
Add(m2);
|
|
|
|
Add(m3);
|
|
|
|
Add(m4);
|
2022-09-18 05:55:13 +00:00
|
|
|
}
|
|
|
|
CMaterialList(const EMaterialTypes& m1, const EMaterialTypes& m2, const EMaterialTypes& m3,
|
|
|
|
const EMaterialTypes& m4, const EMaterialTypes& m5)
|
|
|
|
: value(0) {
|
2022-09-29 23:55:38 +00:00
|
|
|
Add(m1);
|
|
|
|
Add(m2);
|
|
|
|
Add(m3);
|
|
|
|
Add(m4);
|
|
|
|
Add(m5);
|
2022-09-18 05:55:13 +00:00
|
|
|
}
|
2022-08-13 01:26:00 +00:00
|
|
|
CMaterialList(u64 value) : value(value) {}
|
|
|
|
|
2022-09-14 02:25:08 +00:00
|
|
|
void Add(EMaterialTypes material) { value |= u64(1) << material; }
|
2022-09-29 23:55:38 +00:00
|
|
|
// Add__13CMaterialListFRC13CMaterialList weak
|
|
|
|
// Remove__13CMaterialListF14EMaterialTypes weak
|
|
|
|
// Remove__13CMaterialListFRC13CMaterialList weak
|
2022-08-13 01:26:00 +00:00
|
|
|
const CMaterialList& Union(const CMaterialList& other) {
|
|
|
|
value |= other.value;
|
|
|
|
return *this;
|
|
|
|
}
|
2022-09-29 23:55:38 +00:00
|
|
|
bool HasMaterial(EMaterialTypes material) const {
|
|
|
|
return (value & (u64(1) << material)) ? true : false;
|
|
|
|
}
|
|
|
|
// HasMaterials__13CMaterialListCFv weak
|
|
|
|
// GetField__13CMaterialListCFUxUx weak
|
|
|
|
// Intersection__13CMaterialListCFRC13CMaterialList weak
|
2022-10-09 05:37:23 +00:00
|
|
|
static int BitPosition(u64 flags);
|
2022-09-29 23:55:38 +00:00
|
|
|
// GetMaterialString__13CMaterialListCFv weak
|
2022-10-06 18:26:18 +00:00
|
|
|
bool SharesMaterials(const CMaterialList& other) const {
|
|
|
|
return (other.value & value) ? true : false;
|
2022-10-06 17:00:17 +00:00
|
|
|
}
|
2022-08-13 01:26:00 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
u64 value;
|
2022-09-29 23:55:38 +00:00
|
|
|
|
|
|
|
// static CMaterialList kEverything;
|
2022-08-13 01:26:00 +00:00
|
|
|
};
|
|
|
|
CHECK_SIZEOF(CMaterialList, 0x8)
|
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
#endif // _CMATERIALLIST
|