mirror of https://github.com/zeldaret/botw.git
ksys/map: Fix misleading names for wrappers around StaticCompound::setInstanceEnabled
This commit is contained in:
parent
a63b816ffc
commit
f3b3653b0f
|
@ -73778,7 +73778,7 @@ Address,Quality,Size,Name
|
|||
0x0000007100d43d60,U,000248,PlacementMap::staticCompoundStuff
|
||||
0x0000007100d43e58,O,000192,_ZN4ksys3map12PlacementMap25doSomethingStaticCompoundEi
|
||||
0x0000007100d43f18,O,000136,_ZN4ksys3map12PlacementMap15isDynamicLoadedERKN4sead7Vector3IfEE
|
||||
0x0000007100d43fa0,O,000392,_ZN4ksys3map12PlacementMap26doDisableObjStaticCompoundEPNS0_6ObjectEb
|
||||
0x0000007100d43fa0,O,000392,_ZN4ksys3map12PlacementMap32setStaticCompoundInstanceEnabledEPNS0_6ObjectEb
|
||||
0x0000007100d44128,U,000560,PlacementMap::x_9
|
||||
0x0000007100d44358,U,003208,PlacementMapMgr::ctor
|
||||
0x0000007100d44fe0,U,000320,placement::getMubinPath
|
||||
|
|
Can't render this file because it is too large.
|
|
@ -48,7 +48,7 @@ public:
|
|||
_40000 = 0x40000,
|
||||
_80000 = 0x80000,
|
||||
_100000 = 0x100000,
|
||||
_200000 = 0x200000,
|
||||
StaticCompoundInstanceEnabled = 0x200000,
|
||||
_400000 = 0x400000,
|
||||
_2000000 = 0x2000000,
|
||||
_4000000 = 0x4000000,
|
||||
|
|
|
@ -95,17 +95,17 @@ void PlacementMap::updateObjectCollisionAndId(int index, Object* obj) {
|
|||
if (obj->getStaticCompoundActorId() < 0) {
|
||||
return;
|
||||
}
|
||||
bool disable = false;
|
||||
bool enabled = false;
|
||||
if (obj->shouldSkipSpawn() ||
|
||||
(obj->checkActorDataFlag(mPa, map::ActorData::Flag::MapConstPassive) &&
|
||||
obj->getFlags0().isOn(Object::Flag0::_800))) {
|
||||
obj->resetFlags0(Object::Flag0::_200000);
|
||||
disable = false;
|
||||
obj->resetFlags0(Object::Flag0::StaticCompoundInstanceEnabled);
|
||||
enabled = false;
|
||||
} else {
|
||||
obj->setFlags0(Object::Flag0::_200000);
|
||||
disable = true;
|
||||
obj->setFlags0(Object::Flag0::StaticCompoundInstanceEnabled);
|
||||
enabled = true;
|
||||
}
|
||||
sc->setInstanceEnabled(idx, disable);
|
||||
sc->setInstanceEnabled(idx, enabled);
|
||||
}
|
||||
|
||||
bool PlacementMap::parseStaticMap_(sead::Heap* heap, u8* data) {
|
||||
|
@ -235,27 +235,26 @@ PlacementMap::MapObjStatus PlacementMap::x_2(int hksc_idx) {
|
|||
return MapObjStatus::Loading;
|
||||
}
|
||||
|
||||
void PlacementMap::doDisableObjStaticCompound(Object* obj, bool disable) {
|
||||
if ((s16)obj->getStaticCompoundActorId() < 0) {
|
||||
void PlacementMap::setStaticCompoundInstanceEnabled(Object* obj, bool enabled) {
|
||||
if (obj->getStaticCompoundActorId() < 0) {
|
||||
return;
|
||||
}
|
||||
const auto lock = sead::makeScopedLock(mCs);
|
||||
|
||||
// Is Flag0::_200000 a flag to disable an object?
|
||||
if (disable == obj->getFlags0().isOn(Object::Flag0::_200000)) {
|
||||
if (enabled == obj->getFlags0().isOn(Object::Flag0::StaticCompoundInstanceEnabled)) {
|
||||
return;
|
||||
}
|
||||
if (disable) {
|
||||
obj->setFlags0(Object::Flag0::_200000);
|
||||
if (enabled) {
|
||||
obj->setFlags0(Object::Flag0::StaticCompoundInstanceEnabled);
|
||||
} else {
|
||||
obj->resetFlags0(Object::Flag0::_200000);
|
||||
obj->resetFlags0(Object::Flag0::StaticCompoundInstanceEnabled);
|
||||
}
|
||||
|
||||
int idx = getStaticCompoundIdFromPosition(obj->getTranslate());
|
||||
auto* resource = mRes[idx].mRes.getResource();
|
||||
if (auto* sc = sead::DynamicCast<ksys::phys::StaticCompound>(resource)) {
|
||||
s16 sc_id = obj->getStaticCompoundActorId();
|
||||
sc->setInstanceEnabled(sc_id, disable);
|
||||
sc->setInstanceEnabled(sc_id, enabled);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ private:
|
|||
bool staticCompoundStuff(int sc_id, bool cleanup);
|
||||
int doSomethingStaticCompound(int hksc_idx);
|
||||
bool isDynamicLoaded(const sead::Vector3f& pos);
|
||||
void doDisableObjStaticCompound(Object* obj, bool disable);
|
||||
void setStaticCompoundInstanceEnabled(Object* obj, bool enabled);
|
||||
void x_9();
|
||||
|
||||
void x_7(int idx, int unknown, s8 column, s8 row, const sead::SafeString& mubin_path,
|
||||
|
|
Loading…
Reference in New Issue