mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-22 23:57:54 -05:00
Use names from 1996 sources (#437)
This commit is contained in:
parent
7e9d3bde65
commit
dd72bcc666
16 changed files with 63 additions and 63 deletions
|
@ -26,20 +26,20 @@ class LegoEntityPresenter : public MxCompositePresenter {
|
|||
}
|
||||
|
||||
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();
|
||||
|
|
|
@ -14,12 +14,12 @@ class MxMediaManager : public MxCore {
|
|||
MxMediaManager();
|
||||
virtual ~MxMediaManager() override;
|
||||
|
||||
virtual MxResult Tickle() override; // vtable+08
|
||||
virtual MxResult InitPresenters(); // vtable+14
|
||||
virtual void Destroy(); // vtable+18
|
||||
virtual void AddPresenter(MxPresenter& p_presenter); // vtable+1c
|
||||
virtual void RemovePresenter(MxPresenter& p_presenter); // vtable+20
|
||||
virtual void StopPresenters(); // vtable+24
|
||||
virtual MxResult Tickle() override; // vtable+08
|
||||
virtual MxResult InitPresenters(); // vtable+14
|
||||
virtual void Destroy(); // vtable+18
|
||||
virtual void RegisterPresenter(MxPresenter& p_presenter); // vtable+1c
|
||||
virtual void UnregisterPresenter(MxPresenter& p_presenter); // vtable+20
|
||||
virtual void StopPresenters(); // vtable+24
|
||||
|
||||
MxResult Init();
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ class MxPresenter : public MxCore {
|
|||
|
||||
__declspec(dllexport) virtual void Enable(MxBool p_enable); // vtable+0x54
|
||||
|
||||
MxEntity* CreateEntityBackend(const char* p_name);
|
||||
MxEntity* CreateEntity(const char* p_name);
|
||||
MxBool IsEnabled();
|
||||
|
||||
inline MxS32 GetCurrentTickleState() const { return this->m_currentTickleState; }
|
||||
|
|
|
@ -27,7 +27,7 @@ void MxMusicPresenter::Init()
|
|||
void MxMusicPresenter::Destroy(MxBool p_fromDestructor)
|
||||
{
|
||||
if (MusicManager()) {
|
||||
MusicManager()->RemovePresenter(*this);
|
||||
MusicManager()->UnregisterPresenter(*this);
|
||||
}
|
||||
|
||||
m_criticalSection.Enter();
|
||||
|
@ -46,7 +46,7 @@ MxResult MxMusicPresenter::AddToManager()
|
|||
|
||||
if (MusicManager()) {
|
||||
result = SUCCESS;
|
||||
MusicManager()->AddPresenter(*this);
|
||||
MusicManager()->RegisterPresenter(*this);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
|
@ -9,7 +9,7 @@ DECOMP_SIZE_ASSERT(MxSoundPresenter, 0x54)
|
|||
void MxSoundPresenter::Destroy(MxBool p_fromDestructor)
|
||||
{
|
||||
if (MSoundManager())
|
||||
MSoundManager()->RemovePresenter(*this);
|
||||
MSoundManager()->UnregisterPresenter(*this);
|
||||
|
||||
this->m_criticalSection.Enter();
|
||||
MxMediaPresenter::Init();
|
||||
|
@ -26,7 +26,7 @@ MxResult MxSoundPresenter::AddToManager()
|
|||
|
||||
if (MSoundManager()) {
|
||||
ret = SUCCESS;
|
||||
MSoundManager()->AddPresenter(*this);
|
||||
MSoundManager()->RegisterPresenter(*this);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
|
@ -75,7 +75,7 @@ MxResult MxMediaManager::Tickle()
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b88c0
|
||||
void MxMediaManager::AddPresenter(MxPresenter& p_presenter)
|
||||
void MxMediaManager::RegisterPresenter(MxPresenter& p_presenter)
|
||||
{
|
||||
MxAutoLocker lock(&this->m_criticalSection);
|
||||
|
||||
|
@ -83,7 +83,7 @@ void MxMediaManager::AddPresenter(MxPresenter& p_presenter)
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b8980
|
||||
void MxMediaManager::RemovePresenter(MxPresenter& p_presenter)
|
||||
void MxMediaManager::UnregisterPresenter(MxPresenter& p_presenter)
|
||||
{
|
||||
MxAutoLocker lock(&this->m_criticalSection);
|
||||
MxPresenterListCursor cursor(this->m_presenters);
|
||||
|
|
|
@ -229,7 +229,7 @@ const char* PresenterNameDispatch(const MxDSAction& p_action)
|
|||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100b5410
|
||||
MxEntity* MxPresenter::CreateEntityBackend(const char* p_name)
|
||||
MxEntity* MxPresenter::CreateEntity(const char* p_name)
|
||||
{
|
||||
char buffer[512];
|
||||
char buffer2[512];
|
||||
|
|
|
@ -33,7 +33,7 @@ MxResult MxEventPresenter::AddToManager()
|
|||
|
||||
if (EventManager()) {
|
||||
ret = SUCCESS;
|
||||
EventManager()->AddPresenter(*this);
|
||||
EventManager()->RegisterPresenter(*this);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
@ -43,7 +43,7 @@ MxResult MxEventPresenter::AddToManager()
|
|||
void MxEventPresenter::Destroy()
|
||||
{
|
||||
if (EventManager())
|
||||
EventManager()->RemovePresenter(*this);
|
||||
EventManager()->UnregisterPresenter(*this);
|
||||
|
||||
m_criticalSection.Enter();
|
||||
|
||||
|
|
|
@ -133,7 +133,7 @@ void MxVideoPresenter::Init()
|
|||
void MxVideoPresenter::Destroy(MxBool p_fromDestructor)
|
||||
{
|
||||
if (MVideoManager() != NULL)
|
||||
MVideoManager()->RemovePresenter(*this);
|
||||
MVideoManager()->UnregisterPresenter(*this);
|
||||
|
||||
if (m_unk0x58) {
|
||||
m_unk0x58->Release();
|
||||
|
@ -504,7 +504,7 @@ MxResult MxVideoPresenter::AddToManager()
|
|||
|
||||
if (MVideoManager()) {
|
||||
result = SUCCESS;
|
||||
MVideoManager()->AddPresenter(*this);
|
||||
MVideoManager()->RegisterPresenter(*this);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
Loading…
Reference in a new issue