mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-28 10:41:15 +00:00
LegoActorPresenter
This commit is contained in:
parent
5b8ea35756
commit
205bdf1ec5
@ -60,6 +60,7 @@ add_library(lego1 SHARED
|
|||||||
LEGO1/lego/legoomni/src/control/legocontrolmanager.cpp
|
LEGO1/lego/legoomni/src/control/legocontrolmanager.cpp
|
||||||
LEGO1/lego/legoomni/src/control/mxcontrolpresenter.cpp
|
LEGO1/lego/legoomni/src/control/mxcontrolpresenter.cpp
|
||||||
LEGO1/lego/legoomni/src/entity/legoactor.cpp
|
LEGO1/lego/legoomni/src/entity/legoactor.cpp
|
||||||
|
LEGO1/lego/legoomni/src/entity/legoactorpresenter.cpp
|
||||||
LEGO1/lego/legoomni/src/entity/legoanimactor.cpp
|
LEGO1/lego/legoomni/src/entity/legoanimactor.cpp
|
||||||
LEGO1/lego/legoomni/src/entity/legocameracontroller.cpp
|
LEGO1/lego/legoomni/src/entity/legocameracontroller.cpp
|
||||||
LEGO1/lego/legoomni/src/entity/legoentity.cpp
|
LEGO1/lego/legoomni/src/entity/legoentity.cpp
|
||||||
|
|||||||
@ -19,6 +19,10 @@ class LegoActorPresenter : public LegoEntityPresenter {
|
|||||||
{
|
{
|
||||||
return !strcmp(p_name, LegoActorPresenter::ClassName()) || LegoEntityPresenter::IsA(p_name);
|
return !strcmp(p_name, LegoActorPresenter::ClassName()) || LegoEntityPresenter::IsA(p_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual void ReadyTickle() override; // vtable+0x18
|
||||||
|
virtual void StartingTickle() override; // vtable+0x1c
|
||||||
|
virtual void ParseExtra(); // vtable+0x30
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // LEGOACTORPRESENTER_H
|
#endif // LEGOACTORPRESENTER_H
|
||||||
|
|||||||
@ -52,6 +52,8 @@ class LegoEntity : public MxEntity {
|
|||||||
void FUN_10010c30();
|
void FUN_10010c30();
|
||||||
void SetLocation(Mx3DPointFloat& p_location, Mx3DPointFloat& p_direction, Mx3DPointFloat& p_up, MxBool);
|
void SetLocation(Mx3DPointFloat& p_location, Mx3DPointFloat& p_direction, Mx3DPointFloat& p_up, MxBool);
|
||||||
|
|
||||||
|
inline LegoROI* GetROI() { return m_roi; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void Init();
|
void Init();
|
||||||
void SetWorld();
|
void SetWorld();
|
||||||
|
|||||||
39
LEGO1/lego/legoomni/src/entity/legoactorpresenter.cpp
Normal file
39
LEGO1/lego/legoomni/src/entity/legoactorpresenter.cpp
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
#include "legoactorpresenter.h"
|
||||||
|
|
||||||
|
#include "legoentity.h"
|
||||||
|
#include "legoomni.h"
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x10076c30
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
ProgressTickleState(TickleState_Starting);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x10076c90
|
||||||
|
void LegoActorPresenter::StartingTickle()
|
||||||
|
{
|
||||||
|
if (m_objectBackend->GetROI()) {
|
||||||
|
ProgressTickleState(TickleState_Streaming);
|
||||||
|
ParseExtra();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION: LEGO1 0x10076cc0
|
||||||
|
void LegoActorPresenter::ParseExtra()
|
||||||
|
{
|
||||||
|
char buffer[512];
|
||||||
|
char* extraData = m_action->GetExtraData();
|
||||||
|
if (m_action->GetExtraLength()) {
|
||||||
|
memcpy(buffer, extraData, m_action->GetExtraLength());
|
||||||
|
buffer[m_action->GetExtraLength()] = 0;
|
||||||
|
|
||||||
|
m_objectBackend->ParseAction(buffer);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user