This commit is contained in:
Ian Curtis 2016-04-18 14:06:10 +00:00
parent a5301efed6
commit 057ee94210
2 changed files with 1 additions and 30 deletions

View file

@ -405,7 +405,7 @@ void CNew3D::DescendNodePtr(UINT32 nodeAddr)
case 0x00: // culling node case 0x00: // culling node
DescendCullingNode(nodeAddr & 0xFFFFFF); DescendCullingNode(nodeAddr & 0xFFFFFF);
break; break;
case 0x01: // model (perhaps bit 1 is a flag in this case?) case 0x01: // model (perhaps bit 2 is a flag in this case?)
case 0x03: case 0x03:
DrawModel(nodeAddr & 0xFFFFFF); DrawModel(nodeAddr & 0xFFFFFF);
break; break;
@ -424,19 +424,12 @@ void CNew3D::DescendPointerList(UINT32 addr)
UINT32 nodeAddr; UINT32 nodeAddr;
int index; int index;
if (m_listDepth > 2) { // several Step 2.1 games require this safeguard
return;
}
list = TranslateCullingAddress(addr); list = TranslateCullingAddress(addr);
if (NULL == list) { if (NULL == list) {
return; return;
} }
m_listDepth++;
// Traverse the list forward and print it out
index = 0; index = 0;
while (true) { while (true) {
@ -455,25 +448,6 @@ void CNew3D::DescendPointerList(UINT32 addr)
index++; index++;
} }
/*
// Traverse the list backward and descend into each pointer
while (index >= 0)
{
nodeAddr = list[index] & 0x00FFFFFF; // clear upper 8 bits to ensure this is processed as a culling node
if (!(list[index] & 0x01000000)) { //Fighting Vipers
if ((nodeAddr != 0) && (nodeAddr != 0x800800)) {
DescendCullingNode(nodeAddr);
}
}
index--;
}
*/
m_listDepth--;
} }
@ -758,8 +732,6 @@ void CNew3D::RenderViewport(UINT32 addr, int pri)
return; return;
} }
m_listDepth = 0;
// Descend down the node link: Use recursive traversal // Descend down the node link: Use recursive traversal
DescendNodePtr(nodeAddr); DescendNodePtr(nodeAddr);
} }

View file

@ -203,7 +203,6 @@ private:
TextureSheet m_texSheet; TextureSheet m_texSheet;
NodeAttributes m_nodeAttribs; NodeAttributes m_nodeAttribs;
Mat4 m_modelMat; // current modelview matrix Mat4 m_modelMat; // current modelview matrix
int m_listDepth;
std::vector<Node> m_nodes; // this represents the entire render frame std::vector<Node> m_nodes; // this represents the entire render frame
std::vector<Poly> m_polyBufferRam; // dynamic polys std::vector<Poly> m_polyBufferRam; // dynamic polys