From 4d275ba49e846bd9a7127c57bafb607680fa34a0 Mon Sep 17 00:00:00 2001 From: Ian Curtis Date: Thu, 3 May 2018 18:37:49 +0000 Subject: [PATCH] Parse siblings after children. It's the only way to get Daytona water fall to look correct without h/w poly sorting. --- Src/Graphics/New3D/New3D.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Src/Graphics/New3D/New3D.cpp b/Src/Graphics/New3D/New3D.cpp index 07e33bb..f22cfaf 100644 --- a/Src/Graphics/New3D/New3D.cpp +++ b/Src/Graphics/New3D/New3D.cpp @@ -469,12 +469,6 @@ void CNew3D::DescendCullingNode(UINT32 addr) matrixOffset = node[0x03 - m_offset] & 0xFFF; lodTablePointer = (node[0x03 - m_offset] >> 12) & 0x7F; - if ((node[0x00] & 0x07) != 0x06) { // colour table seems to indicate no siblings - if (!(sibling2Ptr & 0x1000000) && sibling2Ptr) { - DescendCullingNode(sibling2Ptr); // no need to mask bit, would already be zero - } - } - if ((node[0x00] & 0x04)) { m_colorTableAddr = ((node[0x03 - m_offset] >> 19) << 0) | ((node[0x07 - m_offset] >> 28) << 13) | ((node[0x08 - m_offset] >> 25) << 17); m_colorTableAddr &= 0x000FFFFF; // clamp to 4MB (in words) range @@ -564,6 +558,13 @@ void CNew3D::DescendCullingNode(UINT32 addr) // Restore old texture offsets m_nodeAttribs.Pop(); + + // parse siblings + if ((node[0x00] & 0x07) != 0x06) { // colour table seems to indicate no siblings + if (!(sibling2Ptr & 0x1000000) && sibling2Ptr) { + DescendCullingNode(sibling2Ptr); // no need to mask bit, would already be zero + } + } } void CNew3D::DescendNodePtr(UINT32 nodeAddr)