mirror of https://github.com/zeldaret/botw.git
ksys/phys: Add isSensorLayer and makeContactLayerMask
This commit is contained in:
parent
2fe382fb1a
commit
6deecbee61
|
@ -79375,8 +79375,8 @@
|
||||||
0x0000007100e93db0,sub_7100E93DB0,492,
|
0x0000007100e93db0,sub_7100E93DB0,492,
|
||||||
0x0000007100e93f9c,NPCBase::m2,288,
|
0x0000007100e93f9c,NPCBase::m2,288,
|
||||||
0x0000007100e940bc,NPCBase::m3,92,
|
0x0000007100e940bc,NPCBase::m3,92,
|
||||||
0x0000007100e94118,isGreaterThan0x1F,28,
|
0x0000007100e94118,isGreaterThan0x1F,28,_ZN4ksys4phys13isSensorLayerENS0_12ContactLayerE
|
||||||
0x0000007100e94134,getPowerOfTwo,44,
|
0x0000007100e94134,getPowerOfTwo,44,_ZN4ksys4phys20makeContactLayerMaskENS0_12ContactLayerE
|
||||||
0x0000007100e94160,sub_7100E94160,16,
|
0x0000007100e94160,sub_7100E94160,16,
|
||||||
0x0000007100e94170,sub_7100E94170,40,
|
0x0000007100e94170,sub_7100E94170,40,
|
||||||
0x0000007100e94198,sub_7100E94198,4,_ZN4ksys4phys18contactLayerToTextENS0_12ContactLayerE
|
0x0000007100e94198,sub_7100E94198,4,_ZN4ksys4phys18contactLayerToTextENS0_12ContactLayerE
|
||||||
|
|
Can't render this file because it is too large.
|
|
@ -2,6 +2,16 @@
|
||||||
|
|
||||||
namespace ksys::phys {
|
namespace ksys::phys {
|
||||||
|
|
||||||
|
bool isSensorLayer(ContactLayer layer) {
|
||||||
|
return layer > ContactLayer::EntityEnd;
|
||||||
|
}
|
||||||
|
|
||||||
|
u32 makeContactLayerMask(ContactLayer layer) {
|
||||||
|
if (layer < ContactLayer::SensorObject)
|
||||||
|
return 1 << layer;
|
||||||
|
return 1 << (layer - ContactLayer::SensorObject);
|
||||||
|
}
|
||||||
|
|
||||||
const char* contactLayerToText(ContactLayer layer) {
|
const char* contactLayerToText(ContactLayer layer) {
|
||||||
return layer.text();
|
return layer.text();
|
||||||
}
|
}
|
||||||
|
|
|
@ -159,6 +159,9 @@ enum class MotionType {
|
||||||
Unknown = 3,
|
Unknown = 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bool isSensorLayer(ContactLayer layer);
|
||||||
|
u32 makeContactLayerMask(ContactLayer layer);
|
||||||
|
|
||||||
const char* contactLayerToText(ContactLayer layer);
|
const char* contactLayerToText(ContactLayer layer);
|
||||||
ContactLayer contactLayerFromText(const sead::SafeString& text);
|
ContactLayer contactLayerFromText(const sead::SafeString& text);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue