mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-24 08:54:15 +00:00
Implement/match LegoROI/LegoLOD::GetTexture (#814)
* Implement/match LegoROI/LegoLOD::GetTexture
* Remove explicit truth tests
* LegoTextureContainer::AddToList fix
* Revert "Remove explicit truth tests"
This reverts commit d169349bd6.
This commit is contained in:
committed by
GitHub
parent
a64bb4d460
commit
06fadd922e
@@ -160,6 +160,30 @@ BOOL LegoTextureInfo::SetGroupTexture(Tgl::Mesh* pMesh, LegoTextureInfo* p_textu
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x10065f90
|
||||
BOOL LegoTextureInfo::GetGroupTexture(Tgl::Mesh* pMesh, LegoTextureInfo*& p_textureInfo)
|
||||
{
|
||||
TglImpl::MeshImpl::MeshData* data = ((TglImpl::MeshImpl*) pMesh)->ImplementationData();
|
||||
|
||||
IDirect3DRMMesh* mesh = data->groupMesh;
|
||||
D3DRMGROUPINDEX id = data->groupIndex;
|
||||
LPDIRECT3DRMTEXTURE returnPtr = NULL;
|
||||
LPDIRECT3DRMTEXTURE2 texture = NULL;
|
||||
|
||||
if (mesh->GetGroupTexture(id, &returnPtr) == D3DRM_OK) {
|
||||
if (returnPtr->QueryInterface(IID_IDirect3DRMTexture2, (LPVOID*) &texture) == D3DRM_OK) {
|
||||
p_textureInfo = (LegoTextureInfo*) texture->GetAppData();
|
||||
|
||||
texture->Release();
|
||||
returnPtr->Release();
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// STUB: LEGO1 0x10066010
|
||||
LegoResult LegoTextureInfo::FUN_10066010(LegoU8* p_bits)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user