mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-24 08:54:15 +00:00
Clear unknown 0x10 in LegoEntity (#1593)
The naming is a bit weird, as only one bit is used so there are no other usages of this value.
This commit is contained in:
@@ -18,7 +18,7 @@ LegoActor::LegoActor()
|
||||
m_frequencyFactor = 0.0f;
|
||||
m_sound = NULL;
|
||||
m_unk0x70 = 0.0f;
|
||||
m_unk0x10 = 0;
|
||||
m_interaction = 0;
|
||||
m_actorId = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ void LegoEntity::Init()
|
||||
m_roi = NULL;
|
||||
m_cameraFlag = FALSE;
|
||||
m_siFile = NULL;
|
||||
m_unk0x10 = 0;
|
||||
m_interaction = 0;
|
||||
m_flags = 0;
|
||||
m_actionType = Extra::ActionType::e_unknown;
|
||||
m_targetEntityId = -1;
|
||||
@@ -265,7 +265,7 @@ void LegoEntity::ParseAction(char* p_extra)
|
||||
// FUNCTION: BETA10 0x1007ee87
|
||||
void LegoEntity::ClickSound(MxBool p_und)
|
||||
{
|
||||
if (!GetUnknown0x10IsSet(c_altBit1)) {
|
||||
if (!IsInteraction(c_disabled)) {
|
||||
MxU32 objectId = 0;
|
||||
const char* name = m_roi->GetName();
|
||||
|
||||
@@ -297,7 +297,7 @@ void LegoEntity::ClickSound(MxBool p_und)
|
||||
// FUNCTION: BETA10 0x1007f062
|
||||
void LegoEntity::ClickAnimation()
|
||||
{
|
||||
if (!GetUnknown0x10IsSet(c_altBit1)) {
|
||||
if (!IsInteraction(c_disabled)) {
|
||||
MxU32 objectId = 0;
|
||||
MxDSAction action;
|
||||
const char* name = m_roi->GetName();
|
||||
@@ -329,7 +329,7 @@ void LegoEntity::ClickAnimation()
|
||||
action.SetObjectId(objectId);
|
||||
action.AppendExtra(strlen(extra) + 1, extra);
|
||||
LegoOmni::GetInstance()->GetAnimationManager()->StartEntityAction(action, this);
|
||||
m_unk0x10 |= c_altBit1;
|
||||
m_interaction |= c_disabled;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -691,7 +691,7 @@ MxLong LegoNavController::Notify(MxParam& p_param)
|
||||
for (MxS32 i = 0; i < numPlants; i++) {
|
||||
LegoEntity* entity = plantMgr->CreatePlant(i, NULL, LegoOmni::e_act1);
|
||||
|
||||
if (entity != NULL && !entity->GetUnknown0x10IsSet(LegoEntity::c_altBit1)) {
|
||||
if (entity != NULL && !entity->IsInteraction(LegoEntity::c_disabled)) {
|
||||
LegoROI* roi = entity->GetROI();
|
||||
|
||||
if (roi != NULL && roi->GetVisibility()) {
|
||||
|
||||
@@ -790,7 +790,7 @@ void LegoAnimPresenter::StartingTickle()
|
||||
}
|
||||
|
||||
FUN_10069b10();
|
||||
FUN_1006c8a0(TRUE);
|
||||
SetDisabled(TRUE);
|
||||
|
||||
if (m_unk0x78 == NULL) {
|
||||
if (fabs(m_action->GetDirection()[0]) >= 0.00000047683716F ||
|
||||
@@ -1090,7 +1090,7 @@ void LegoAnimPresenter::EndAction()
|
||||
}
|
||||
}
|
||||
|
||||
FUN_1006c8a0(FALSE);
|
||||
SetDisabled(FALSE);
|
||||
FUN_1006ab70();
|
||||
VTable0x90();
|
||||
|
||||
@@ -1151,18 +1151,18 @@ void LegoAnimPresenter::VTable0x90()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1006c8a0
|
||||
void LegoAnimPresenter::FUN_1006c8a0(MxBool p_bool)
|
||||
void LegoAnimPresenter::SetDisabled(MxBool p_disabled)
|
||||
{
|
||||
if (m_roiMapSize != 0 && m_roiMap != NULL) {
|
||||
for (MxU32 i = 1; i <= m_roiMapSize; i++) {
|
||||
LegoEntity* entity = m_roiMap[i]->GetEntity();
|
||||
|
||||
if (entity != NULL) {
|
||||
if (p_bool) {
|
||||
entity->SetUnknown0x10Flag(LegoEntity::c_altBit1);
|
||||
if (p_disabled) {
|
||||
entity->SetInteractionFlag(LegoEntity::c_disabled);
|
||||
}
|
||||
else {
|
||||
entity->ClearUnknown0x10Flag(LegoEntity::c_altBit1);
|
||||
entity->ClearInteractionFlag(LegoEntity::c_disabled);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user