mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 00:14:22 +00:00
Use names from 1996 sources (#437)
This commit is contained in:

committed by
GitHub

parent
7e9d3bde65
commit
dd72bcc666
@@ -26,20 +26,20 @@ public:
|
||||
}
|
||||
|
||||
virtual void ReadyTickle() override; // vtable+0x18
|
||||
virtual void RepeatingTickle(); // vtable+0x24
|
||||
virtual void ParseExtra(); // vtable+0x30
|
||||
virtual void RepeatingTickle() override; // vtable+0x24
|
||||
virtual void ParseExtra() override; // vtable+0x30
|
||||
virtual void Destroy() override; // vtable+0x38
|
||||
virtual MxResult StartAction(MxStreamController* p_controller, MxDSAction* p_action) override; // vtable+0x3c
|
||||
virtual void Init(); // vtable+0x68
|
||||
virtual undefined4 SetBackend(LegoEntity* p_unk0x4c); // vtable+0x6c
|
||||
virtual undefined4 SetEntity(LegoEntity* p_entity); // vtable+0x6c
|
||||
|
||||
void SetBackendLocation(Mx3DPointFloat& p_location, Mx3DPointFloat& p_direction, Mx3DPointFloat& p_up);
|
||||
void SetEntityLocation(Mx3DPointFloat& p_location, Mx3DPointFloat& p_direction, Mx3DPointFloat& p_up);
|
||||
|
||||
private:
|
||||
void Destroy(MxBool p_fromDestructor);
|
||||
|
||||
protected:
|
||||
LegoEntity* m_objectBackend; // 0x4c
|
||||
LegoEntity* m_entity; // 0x4c
|
||||
};
|
||||
|
||||
#endif // LEGOENTITYPRESENTER_H
|
||||
|
@@ -16,13 +16,13 @@ MxCompositeMediaPresenter::MxCompositeMediaPresenter()
|
||||
{
|
||||
m_unk0x4c = 0;
|
||||
m_unk0x4e = FALSE;
|
||||
VideoManager()->AddPresenter(*this);
|
||||
VideoManager()->RegisterPresenter(*this);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10074020
|
||||
MxCompositeMediaPresenter::~MxCompositeMediaPresenter()
|
||||
{
|
||||
VideoManager()->RemovePresenter(*this);
|
||||
VideoManager()->UnregisterPresenter(*this);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10074090
|
||||
@@ -58,9 +58,9 @@ MxResult MxCompositeMediaPresenter::StartAction(MxStreamController* p_controller
|
||||
presenter->SetTickleState(TickleState_Idle);
|
||||
|
||||
if (presenter->IsA("MxVideoPresenter"))
|
||||
VideoManager()->RemovePresenter(*presenter);
|
||||
VideoManager()->UnregisterPresenter(*presenter);
|
||||
else if (presenter->IsA("MxAudioPresenter"))
|
||||
SoundManager()->RemovePresenter(*presenter);
|
||||
SoundManager()->UnregisterPresenter(*presenter);
|
||||
|
||||
success = TRUE;
|
||||
}
|
||||
|
@@ -7,10 +7,10 @@
|
||||
void LegoActorPresenter::ReadyTickle()
|
||||
{
|
||||
if (GetCurrentWorld()) {
|
||||
m_objectBackend = (LegoEntity*) CreateEntityBackend("LegoActor");
|
||||
if (m_objectBackend) {
|
||||
SetBackendLocation(m_action->GetLocation(), m_action->GetDirection(), m_action->GetUp());
|
||||
m_objectBackend->Create(*m_action);
|
||||
m_entity = (LegoEntity*) CreateEntity("LegoActor");
|
||||
if (m_entity) {
|
||||
SetEntityLocation(m_action->GetLocation(), m_action->GetDirection(), m_action->GetUp());
|
||||
m_entity->Create(*m_action);
|
||||
}
|
||||
ProgressTickleState(TickleState_Starting);
|
||||
}
|
||||
@@ -19,7 +19,7 @@ void LegoActorPresenter::ReadyTickle()
|
||||
// FUNCTION: LEGO1 0x10076c90
|
||||
void LegoActorPresenter::StartingTickle()
|
||||
{
|
||||
if (m_objectBackend->GetROI()) {
|
||||
if (m_entity->GetROI()) {
|
||||
ProgressTickleState(TickleState_Streaming);
|
||||
ParseExtra();
|
||||
}
|
||||
@@ -34,6 +34,6 @@ void LegoActorPresenter::ParseExtra()
|
||||
memcpy(buffer, extraData, m_action->GetExtraLength());
|
||||
buffer[m_action->GetExtraLength()] = 0;
|
||||
|
||||
m_objectBackend->ParseAction(buffer);
|
||||
m_entity->ParseAction(buffer);
|
||||
}
|
||||
}
|
||||
|
@@ -15,7 +15,7 @@ LegoEntityPresenter::LegoEntityPresenter()
|
||||
// FUNCTION: LEGO1 0x100535c0
|
||||
void LegoEntityPresenter::Init()
|
||||
{
|
||||
m_objectBackend = 0;
|
||||
m_entity = NULL;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100535d0
|
||||
@@ -25,9 +25,9 @@ LegoEntityPresenter::~LegoEntityPresenter()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10053630
|
||||
undefined4 LegoEntityPresenter::SetBackend(LegoEntity* p_backend)
|
||||
undefined4 LegoEntityPresenter::SetEntity(LegoEntity* p_entity)
|
||||
{
|
||||
m_objectBackend = p_backend;
|
||||
m_entity = p_entity;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ undefined4 LegoEntityPresenter::SetBackend(LegoEntity* p_backend)
|
||||
void LegoEntityPresenter::Destroy(MxBool p_fromDestructor)
|
||||
{
|
||||
if (VideoManager()) {
|
||||
VideoManager()->RemovePresenter(*this);
|
||||
VideoManager()->UnregisterPresenter(*this);
|
||||
}
|
||||
|
||||
Init();
|
||||
@@ -53,7 +53,7 @@ MxResult LegoEntityPresenter::StartAction(MxStreamController* p_controller, MxDS
|
||||
MxResult result = MxCompositePresenter::StartAction(p_controller, p_action);
|
||||
|
||||
if (VideoManager()) {
|
||||
VideoManager()->AddPresenter(*this);
|
||||
VideoManager()->RegisterPresenter(*this);
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -63,10 +63,10 @@ MxResult LegoEntityPresenter::StartAction(MxStreamController* p_controller, MxDS
|
||||
void LegoEntityPresenter::ReadyTickle()
|
||||
{
|
||||
if (GetCurrentWorld()) {
|
||||
m_objectBackend = (LegoEntity*) MxPresenter::CreateEntityBackend("LegoEntity");
|
||||
if (m_objectBackend) {
|
||||
m_objectBackend->Create(*m_action);
|
||||
m_objectBackend->SetLocation(m_action->GetLocation(), m_action->GetDirection(), m_action->GetUp(), TRUE);
|
||||
m_entity = (LegoEntity*) MxPresenter::CreateEntity("LegoEntity");
|
||||
if (m_entity) {
|
||||
m_entity->Create(*m_action);
|
||||
m_entity->SetLocation(m_action->GetLocation(), m_action->GetDirection(), m_action->GetUp(), TRUE);
|
||||
ParseExtra();
|
||||
}
|
||||
ProgressTickleState(TickleState_Starting);
|
||||
@@ -82,14 +82,14 @@ void LegoEntityPresenter::RepeatingTickle()
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10053730
|
||||
void LegoEntityPresenter::SetBackendLocation(
|
||||
void LegoEntityPresenter::SetEntityLocation(
|
||||
Mx3DPointFloat& p_location,
|
||||
Mx3DPointFloat& p_direction,
|
||||
Mx3DPointFloat& p_up
|
||||
)
|
||||
{
|
||||
if (m_objectBackend) {
|
||||
m_objectBackend->SetLocation(p_location, p_direction, p_up, TRUE);
|
||||
if (m_entity) {
|
||||
m_entity->SetLocation(p_location, p_direction, p_up, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,6 +103,6 @@ void LegoEntityPresenter::ParseExtra()
|
||||
data[len] = 0;
|
||||
|
||||
len &= MAXWORD;
|
||||
m_objectBackend->ParseAction(data);
|
||||
m_entity->ParseAction(data);
|
||||
}
|
||||
}
|
||||
|
@@ -35,26 +35,26 @@ LegoWorldPresenter::LegoWorldPresenter()
|
||||
LegoWorldPresenter::~LegoWorldPresenter()
|
||||
{
|
||||
MxBool result = FALSE;
|
||||
if (m_objectBackend) {
|
||||
undefined4 world = ((LegoWorld*) m_objectBackend)->GetUnknown0xec();
|
||||
if (m_entity) {
|
||||
undefined4 world = ((LegoWorld*) m_entity)->GetUnknown0xec();
|
||||
PlantManager()->FUN_10026360(world);
|
||||
AnimationManager()->FUN_1005f720(world);
|
||||
BuildingManager()->FUN_1002fa00();
|
||||
result = ((LegoWorld*) m_objectBackend)->VTable0x5c();
|
||||
result = ((LegoWorld*) m_entity)->VTable0x5c();
|
||||
}
|
||||
|
||||
if (result == FALSE) {
|
||||
FUN_10015820(0, 7);
|
||||
}
|
||||
|
||||
if (m_objectBackend) {
|
||||
if (m_entity) {
|
||||
#ifdef COMPAT_MODE
|
||||
{
|
||||
MxNotificationParam param(c_notificationNewPresenter, NULL);
|
||||
NotificationManager()->Send(m_objectBackend, ¶m);
|
||||
NotificationManager()->Send(m_entity, ¶m);
|
||||
}
|
||||
#else
|
||||
NotificationManager()->Send(m_objectBackend, &MxNotificationParam(c_notificationNewPresenter, NULL));
|
||||
NotificationManager()->Send(m_entity, &MxNotificationParam(c_notificationNewPresenter, NULL));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -103,7 +103,7 @@ MxResult LegoWorldPresenter::StartAction(MxStreamController* p_controller, MxDSA
|
||||
delete presenter;
|
||||
}
|
||||
|
||||
VideoManager()->AddPresenter(*this);
|
||||
VideoManager()->RegisterPresenter(*this);
|
||||
|
||||
result = SUCCESS;
|
||||
}
|
||||
@@ -114,11 +114,11 @@ MxResult LegoWorldPresenter::StartAction(MxStreamController* p_controller, MxDSA
|
||||
// FUNCTION: LEGO1 0x10066a50
|
||||
void LegoWorldPresenter::ReadyTickle()
|
||||
{
|
||||
m_objectBackend = (LegoEntity*) MxPresenter::CreateEntityBackend("LegoWorld");
|
||||
if (m_objectBackend) {
|
||||
m_objectBackend->Create(*m_action);
|
||||
Lego()->AddWorld((LegoWorld*) m_objectBackend);
|
||||
SetBackendLocation(m_action->GetLocation(), m_action->GetDirection(), m_action->GetUp());
|
||||
m_entity = (LegoEntity*) MxPresenter::CreateEntity("LegoWorld");
|
||||
if (m_entity) {
|
||||
m_entity->Create(*m_action);
|
||||
Lego()->AddWorld((LegoWorld*) m_entity);
|
||||
SetEntityLocation(m_action->GetLocation(), m_action->GetDirection(), m_action->GetUp());
|
||||
}
|
||||
|
||||
ParseExtra();
|
||||
|
@@ -29,7 +29,7 @@ MxResult LegoPathPresenter::AddToManager()
|
||||
MxResult status = FAILURE;
|
||||
|
||||
if (VideoManager()) {
|
||||
VideoManager()->AddPresenter(*this);
|
||||
VideoManager()->RegisterPresenter(*this);
|
||||
status = SUCCESS;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ MxResult LegoPathPresenter::AddToManager()
|
||||
void LegoPathPresenter::Destroy(MxBool p_fromDestructor)
|
||||
{
|
||||
if (VideoManager())
|
||||
VideoManager()->RemovePresenter(*this);
|
||||
VideoManager()->UnregisterPresenter(*this);
|
||||
|
||||
{
|
||||
MxAutoLocker lock(&this->m_criticalSection);
|
||||
|
@@ -7,13 +7,13 @@
|
||||
// FUNCTION: LEGO1 0x1004eb40
|
||||
LegoTexturePresenter::~LegoTexturePresenter()
|
||||
{
|
||||
VideoManager()->RemovePresenter(*this);
|
||||
VideoManager()->UnregisterPresenter(*this);
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x1004ebb0
|
||||
MxResult LegoTexturePresenter::AddToManager()
|
||||
{
|
||||
VideoManager()->AddPresenter(*this);
|
||||
VideoManager()->RegisterPresenter(*this);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
@@ -486,7 +486,7 @@ void MxTransitionManager::SetWaitIndicator(MxVideoPresenter* p_waitIndicator)
|
||||
m_waitIndicator = p_waitIndicator;
|
||||
|
||||
LegoVideoManager* videoManager = VideoManager();
|
||||
videoManager->RemovePresenter(*m_waitIndicator);
|
||||
videoManager->UnregisterPresenter(*m_waitIndicator);
|
||||
|
||||
if (m_waitIndicator->GetCurrentTickleState() < MxPresenter::TickleState_Streaming) {
|
||||
m_waitIndicator->Tickle();
|
||||
|
Reference in New Issue
Block a user