mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-24 00:31:16 +00:00
Name flag
This commit is contained in:
parent
59fe106790
commit
b5dd5d5f48
@ -23,7 +23,7 @@ class LegoEntity : public MxEntity {
|
|||||||
|
|
||||||
enum {
|
enum {
|
||||||
c_bit1 = 0x01,
|
c_bit1 = 0x01,
|
||||||
c_bit2 = 0x02
|
c_managerOwned = 0x02
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
|||||||
@ -255,7 +255,7 @@ LegoROI* LegoCharacterManager::GetActorROI(const char* p_name, MxBool p_createEn
|
|||||||
|
|
||||||
actor->SetROI(character->m_roi, FALSE, FALSE);
|
actor->SetROI(character->m_roi, FALSE, FALSE);
|
||||||
actor->SetType(LegoEntity::e_actor);
|
actor->SetType(LegoEntity::e_actor);
|
||||||
actor->SetFlag(LegoEntity::c_bit2);
|
actor->SetFlag(LegoEntity::c_managerOwned);
|
||||||
GetActorInfo(p_name)->m_actor = actor;
|
GetActorInfo(p_name)->m_actor = actor;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -323,11 +323,11 @@ void LegoCharacterManager::ReleaseActor(const char* p_name)
|
|||||||
|
|
||||||
if (info != NULL) {
|
if (info != NULL) {
|
||||||
if (info->m_actor != NULL) {
|
if (info->m_actor != NULL) {
|
||||||
info->m_actor->ClearFlag(LegoEntity::c_bit2);
|
info->m_actor->ClearFlag(LegoEntity::c_managerOwned);
|
||||||
delete info->m_actor;
|
delete info->m_actor;
|
||||||
}
|
}
|
||||||
else if (entity != NULL && entity->GetFlagsIsSet(LegoEntity::c_bit2)) {
|
else if (entity != NULL && entity->GetFlagsIsSet(LegoEntity::c_managerOwned)) {
|
||||||
entity->ClearFlag(LegoEntity::c_bit2);
|
entity->ClearFlag(LegoEntity::c_managerOwned);
|
||||||
delete entity;
|
delete entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -365,11 +365,11 @@ void LegoCharacterManager::ReleaseActor(LegoROI* p_roi)
|
|||||||
|
|
||||||
if (info != NULL) {
|
if (info != NULL) {
|
||||||
if (info->m_actor != NULL) {
|
if (info->m_actor != NULL) {
|
||||||
info->m_actor->ClearFlag(LegoEntity::c_bit2);
|
info->m_actor->ClearFlag(LegoEntity::c_managerOwned);
|
||||||
delete info->m_actor;
|
delete info->m_actor;
|
||||||
}
|
}
|
||||||
else if (entity != NULL && entity->GetFlagsIsSet(LegoEntity::c_bit2)) {
|
else if (entity != NULL && entity->GetFlagsIsSet(LegoEntity::c_managerOwned)) {
|
||||||
entity->ClearFlag(LegoEntity::c_bit2);
|
entity->ClearFlag(LegoEntity::c_managerOwned);
|
||||||
delete entity;
|
delete entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -407,8 +407,8 @@ void LegoCharacterManager::ReleaseAutoROI(LegoROI* p_roi)
|
|||||||
|
|
||||||
m_characters->erase(it);
|
m_characters->erase(it);
|
||||||
|
|
||||||
if (entity != NULL && entity->GetFlagsIsSet(LegoEntity::c_bit2)) {
|
if (entity != NULL && entity->GetFlagsIsSet(LegoEntity::c_managerOwned)) {
|
||||||
entity->ClearFlag(LegoEntity::c_bit2);
|
entity->ClearFlag(LegoEntity::c_managerOwned);
|
||||||
delete entity;
|
delete entity;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -853,7 +853,7 @@ LegoROI* LegoCharacterManager::CreateAutoROI(const char* p_name, const char* p_l
|
|||||||
|
|
||||||
entity->SetROI(roi, FALSE, FALSE);
|
entity->SetROI(roi, FALSE, FALSE);
|
||||||
entity->SetType(LegoEntity::e_autoROI);
|
entity->SetType(LegoEntity::e_autoROI);
|
||||||
entity->SetFlag(LegoEntity::c_bit2);
|
entity->SetFlag(LegoEntity::c_managerOwned);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -187,7 +187,7 @@ void LegoWorld::Destroy(MxBool p_fromDestructor)
|
|||||||
while (cursor.First(entity)) {
|
while (cursor.First(entity)) {
|
||||||
cursor.Detach();
|
cursor.Detach();
|
||||||
|
|
||||||
if (!(entity->GetFlags() & LegoEntity::c_bit2)) {
|
if (!(entity->GetFlags() & LegoEntity::c_managerOwned)) {
|
||||||
delete entity;
|
delete entity;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -224,7 +224,7 @@ MxResult LegoModelPresenter::FUN_1007ff70(
|
|||||||
|
|
||||||
if (p_entity != NULL) {
|
if (p_entity != NULL) {
|
||||||
p_entity->SetROI(m_roi, TRUE, TRUE);
|
p_entity->SetROI(m_roi, TRUE, TRUE);
|
||||||
p_entity->ClearFlag(LegoEntity::c_bit2);
|
p_entity->ClearFlag(LegoEntity::c_managerOwned);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
p_world->GetROIList().push_back(m_roi);
|
p_world->GetROIList().push_back(m_roi);
|
||||||
@ -249,7 +249,8 @@ void LegoModelPresenter::ReadyTickle()
|
|||||||
((LegoEntityPresenter*) m_compositePresenter)
|
((LegoEntityPresenter*) m_compositePresenter)
|
||||||
->GetInternalEntity()
|
->GetInternalEntity()
|
||||||
->SetFlags(
|
->SetFlags(
|
||||||
((LegoEntityPresenter*) m_compositePresenter)->GetInternalEntity()->GetFlags() & ~LegoEntity::c_bit2
|
((LegoEntityPresenter*) m_compositePresenter)->GetInternalEntity()->GetFlags() &
|
||||||
|
~LegoEntity::c_managerOwned
|
||||||
);
|
);
|
||||||
((LegoEntityPresenter*) m_compositePresenter)->GetInternalEntity()->SetType(LegoEntity::e_actor);
|
((LegoEntityPresenter*) m_compositePresenter)->GetInternalEntity()->SetType(LegoEntity::e_actor);
|
||||||
}
|
}
|
||||||
@ -276,7 +277,7 @@ void LegoModelPresenter::ReadyTickle()
|
|||||||
->GetInternalEntity()
|
->GetInternalEntity()
|
||||||
->SetFlags(
|
->SetFlags(
|
||||||
((LegoEntityPresenter*) m_compositePresenter)->GetInternalEntity()->GetFlags() &
|
((LegoEntityPresenter*) m_compositePresenter)->GetInternalEntity()->GetFlags() &
|
||||||
~LegoEntity::c_bit2
|
~LegoEntity::c_managerOwned
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user