mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 08:24:16 +00:00
Implement/match some ViewManager functions (#615)
This commit is contained in:

committed by
GitHub

parent
05965f5357
commit
6de17cf1b6
@@ -37,7 +37,7 @@ public:
|
|||||||
virtual MxResult Create(); // vtable+0x44
|
virtual MxResult Create(); // vtable+0x44
|
||||||
|
|
||||||
void SetWorldTransform(const Vector3& p_at, const Vector3& p_dir, const Vector3& p_up);
|
void SetWorldTransform(const Vector3& p_at, const Vector3& p_dir, const Vector3& p_up);
|
||||||
void FUN_100123e0(const MxMatrix& p_transform, MxU32);
|
void FUN_100123e0(const Matrix4& p_transform, MxU32);
|
||||||
Mx3DPointFloat GetWorldUp();
|
Mx3DPointFloat GetWorldUp();
|
||||||
Mx3DPointFloat GetWorldLocation();
|
Mx3DPointFloat GetWorldLocation();
|
||||||
Mx3DPointFloat GetWorldDirection();
|
Mx3DPointFloat GetWorldDirection();
|
||||||
|
@@ -80,7 +80,7 @@ void LegoCameraController::SetWorldTransform(const Vector3& p_at, const Vector3&
|
|||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x100123e0
|
// STUB: LEGO1 0x100123e0
|
||||||
void LegoCameraController::FUN_100123e0(const MxMatrix& p_transform, MxU32)
|
void LegoCameraController::FUN_100123e0(const Matrix4& p_transform, MxU32)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -38,7 +38,7 @@ public:
|
|||||||
void FUN_100a58f0(const Matrix4& p_transform);
|
void FUN_100a58f0(const Matrix4& p_transform);
|
||||||
void FUN_100a5a30(const Vector3& p_world_velocity);
|
void FUN_100a5a30(const Vector3& p_world_velocity);
|
||||||
|
|
||||||
const MxMatrix& GetLocal2World() const { return m_local2world; }
|
const Matrix4& GetLocal2World() const { return m_local2world; }
|
||||||
const float* GetWorldPosition() const { return m_local2world[3]; }
|
const float* GetWorldPosition() const { return m_local2world[3]; }
|
||||||
const float* GetWorldDirection() const { return m_local2world[2]; }
|
const float* GetWorldDirection() const { return m_local2world[2]; }
|
||||||
const float* GetWorldUp() const { return m_local2world[1]; }
|
const float* GetWorldUp() const { return m_local2world[1]; }
|
||||||
|
@@ -15,12 +15,12 @@ ViewManager::ViewManager(Tgl::Renderer* pRenderer, Tgl::Group* scene, const Orie
|
|||||||
unk0x28 = 0.09;
|
unk0x28 = 0.09;
|
||||||
SetD3DRM(d3drm, pRenderer);
|
SetD3DRM(d3drm, pRenderer);
|
||||||
SetFrame(frame, scene);
|
SetFrame(frame, scene);
|
||||||
unk0x34 = 0.0;
|
width = 0.0;
|
||||||
unk0x38 = 0.0;
|
height = 0.0;
|
||||||
unk0x3c = 0.0;
|
view_angle = 0.0;
|
||||||
unk0x40.SetIdentity();
|
pov.SetIdentity();
|
||||||
unk0x88 = 0.0;
|
front = 0.0;
|
||||||
unk0x8c = 0.0;
|
back = 0.0;
|
||||||
|
|
||||||
memset(unk0xf0, 0, sizeof(unk0xf0));
|
memset(unk0xf0, 0, sizeof(unk0xf0));
|
||||||
seconds_allowed = 1.0;
|
seconds_allowed = 1.0;
|
||||||
@@ -44,22 +44,30 @@ void ViewManager::Update(float p_previousRenderTime, float p_und2)
|
|||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x100a6d50
|
// FUNCTION: LEGO1 0x100a6d50
|
||||||
void ViewManager::SetResolution(int width, int height)
|
void ViewManager::SetResolution(int width, int height)
|
||||||
{
|
{
|
||||||
// TODO
|
flags |= c_bit3;
|
||||||
|
this->width = width;
|
||||||
|
this->height = height;
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x100a6d70
|
// FUNCTION: LEGO1 0x100a6d70
|
||||||
void ViewManager::SetFrustrum(float fov, float front, float back)
|
void ViewManager::SetFrustrum(float fov, float front, float back)
|
||||||
{
|
{
|
||||||
// TODO
|
this->front = front;
|
||||||
|
this->back = back;
|
||||||
|
flags |= c_bit3;
|
||||||
|
view_angle = fov * 0.017453292519944444;
|
||||||
}
|
}
|
||||||
|
|
||||||
// STUB: LEGO1 0x100a6da0
|
// FUNCTION: LEGO1 0x100a6da0
|
||||||
void ViewManager::SetPOVSource(const OrientableROI* point_of_view)
|
void ViewManager::SetPOVSource(const OrientableROI* point_of_view)
|
||||||
{
|
{
|
||||||
// TODO
|
if (point_of_view != NULL) {
|
||||||
|
pov = point_of_view->GetLocal2World();
|
||||||
|
flags |= c_bit2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inline undefined4 SetD3DRM(IDirect3DRM2*& d3drm, Tgl::Renderer* pRenderer)
|
inline undefined4 SetD3DRM(IDirect3DRM2*& d3drm, Tgl::Renderer* pRenderer)
|
||||||
|
@@ -43,12 +43,12 @@ private:
|
|||||||
float unk0x28; // 0x28
|
float unk0x28; // 0x28
|
||||||
undefined4 unk0x2c; // 0x2c
|
undefined4 unk0x2c; // 0x2c
|
||||||
unsigned int flags; // 0x30
|
unsigned int flags; // 0x30
|
||||||
float unk0x34; // 0x34
|
float width; // 0x34
|
||||||
float unk0x38; // 0x38
|
float height; // 0x38
|
||||||
float unk0x3c; // 0x3c
|
float view_angle; // 0x3c
|
||||||
MxMatrix unk0x40; // 0x40
|
MxMatrix pov; // 0x40
|
||||||
float unk0x88; // 0x88
|
float front; // 0x88
|
||||||
float unk0x8c; // 0x8c
|
float back; // 0x8c
|
||||||
undefined unk0x90[0x60]; // 0x90
|
undefined unk0x90[0x60]; // 0x90
|
||||||
undefined unk0xf0[0x60]; // 0xf0
|
undefined unk0xf0[0x60]; // 0xf0
|
||||||
undefined unk0x150[0x60]; // 0x150
|
undefined unk0x150[0x60]; // 0x150
|
||||||
|
Reference in New Issue
Block a user