isle/LEGO1/tgl/d3drm/camera.cpp
Mark Langen 77730334d0 Restructure changes using Tgl naming / details
* Restructure the changes to use the naming that we know from Tgl.

* Fill in some parts of the implementation I couldn't initially figure
  out using the details from Tgl (got more 100% matches).
2023-11-28 21:53:20 -08:00

39 lines
853 B
C++

#include "impl.h"
using namespace TglImpl;
DECOMP_SIZE_ASSERT(Camera, 0x4);
DECOMP_SIZE_ASSERT(CameraImpl, 0x8);
// Inlined only
CameraImpl::~CameraImpl()
{
if (m_data) {
m_data->Release();
m_data = NULL;
}
}
// OFFSET: LEGO1 0x100a36f0
void* CameraImpl::ImplementationDataPtr()
{
return reinterpret_cast<void*>(&m_data);
}
// OFFSET: LEGO1 0x100a3700
Result CameraImpl::SetTransformation(const FloatMatrix& p_matrix)
{
D3DRMMATRIX4D helper;
D3DRMMATRIX4D* pTransformation = Translate(p_matrix, helper);
D3DVECTOR position;
Result result;
Result result2;
result2 = ResultVal(m_data->GetPosition(0, &position));
result = ResultVal(m_data->AddTransform(D3DRMCOMBINE_REPLACE, *pTransformation));
// The did this second call just to assert on the return value
result2 = ResultVal(m_data->GetPosition(0, &position));
return result;
}