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,5 +1,6 @@
#include "impl.h"
#include <assert.h>
#include <d3drmwin.h>
using namespace TglImpl;
@@ -29,13 +30,20 @@ Result DeviceImpl::SetColorModel(ColorModel)
return Success;
}
// FUNCTION: BETA10 0x1016e020
inline Result DeviceSetShadingModel(IDirect3DRMDevice2* pDevice, ShadingModel model)
{
D3DRMRENDERQUALITY renderQuality = Translate(model);
return ResultVal(pDevice->SetQuality(renderQuality));
}
// FUNCTION: LEGO1 0x100a2c30
// FUNCTION: BETA10 0x1016dfc0
Result DeviceImpl::SetShadingModel(ShadingModel model)
{
// Doesn't match well even though we know this is exactly
// the original code thanks to the jump table.
D3DRMRENDERQUALITY renderQuality = Translate(model);
return ResultVal(m_data->SetQuality(renderQuality));
assert(m_data);
return DeviceSetShadingModel(m_data, model);
}
// FUNCTION: LEGO1 0x100a2ca0