Match a few more Tgl functions (#1435)

* RendererImpl::CreateLight

* Swap addrs for LightImpl and MeshBuilderImpl

* SetShadingModel functions
This commit is contained in:
MS
2025-04-17 17:19:54 -04:00
committed by GitHub
parent 544372759e
commit 451fd63eee
7 changed files with 171 additions and 96 deletions

View File

@@ -1,12 +1,14 @@
#include "impl.h"
#include <assert.h>
using namespace TglImpl;
DECOMP_SIZE_ASSERT(MeshBuilder, 0x04);
DECOMP_SIZE_ASSERT(MeshBuilderImpl, 0x08);
// FUNCTION: LEGO1 0x100a3830
// FUNCTION: BETA10 0x1016f630
// FUNCTION: BETA10 0x1016c9f0
void* MeshBuilderImpl::ImplementationDataPtr()
{
return reinterpret_cast<void*>(&m_data);
@@ -159,12 +161,12 @@ inline Result MeshBuilderImpl::CreateMeshImpl(
);
}
// FUNCTION: LEGO1 0x100a3ae0
Result MeshBuilderImpl::GetBoundingBox(float min[3], float max[3]) const
// FUNCTION: BETA10 0x1016e060
inline Result MeshBuilderGetBoundingBox(IDirect3DRMMesh* pMesh, float min[3], float max[3])
{
D3DRMBOX box;
Result result = ResultVal(m_data->GetBox(&box));
if (result == Success) {
Result result = ResultVal(pMesh->GetBox(&box));
if (Succeeded(result)) {
min[0] = box.min.x;
min[1] = box.min.y;
min[2] = box.min.z;
@@ -175,6 +177,15 @@ Result MeshBuilderImpl::GetBoundingBox(float min[3], float max[3]) const
return result;
}
// FUNCTION: LEGO1 0x100a3ae0
// FUNCTION: BETA10 0x1016ce00
Result MeshBuilderImpl::GetBoundingBox(float min[3], float max[3]) const
{
assert(m_data);
return MeshBuilderGetBoundingBox(m_data, min, max);
}
// FUNCTION: LEGO1 0x100a3b40
MeshBuilder* MeshBuilderImpl::Clone()
{