mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2025-03-06 14:27:44 +00:00
cleaning
This commit is contained in:
parent
b0911afd1f
commit
48a79a8f14
|
@ -6,7 +6,7 @@ NodeAttributes::NodeAttributes()
|
|||
{
|
||||
currentTexOffsetX = 0;
|
||||
currentTexOffsetY = 0;
|
||||
page = 0;
|
||||
currentPage = 0;
|
||||
}
|
||||
|
||||
bool NodeAttributes::Push()
|
||||
|
@ -20,7 +20,7 @@ bool NodeAttributes::Push()
|
|||
return false;
|
||||
}
|
||||
|
||||
na.page = page;
|
||||
na.page = currentPage;
|
||||
na.texOffsetX = currentTexOffsetX;
|
||||
na.texOffsetY = currentTexOffsetY;
|
||||
|
||||
|
@ -35,9 +35,11 @@ bool NodeAttributes::Pop()
|
|||
return false; // check for underflow
|
||||
}
|
||||
|
||||
page = m_vecAttribs.back().page;
|
||||
currentTexOffsetX = m_vecAttribs.back().texOffsetX;
|
||||
currentTexOffsetY = m_vecAttribs.back().texOffsetY;
|
||||
auto last = &m_vecAttribs.back();
|
||||
|
||||
currentPage = last->page;
|
||||
currentTexOffsetX = last->texOffsetX;
|
||||
currentTexOffsetY = last->texOffsetY;
|
||||
|
||||
m_vecAttribs.pop_back();
|
||||
|
||||
|
@ -51,7 +53,7 @@ bool NodeAttributes::StackLimit()
|
|||
|
||||
void NodeAttributes::Reset()
|
||||
{
|
||||
page = 0;
|
||||
currentPage = 0;
|
||||
currentTexOffsetX = 0;
|
||||
currentTexOffsetY = 0;
|
||||
m_vecAttribs.clear();
|
||||
|
|
|
@ -113,7 +113,7 @@ public:
|
|||
|
||||
int currentTexOffsetX;
|
||||
int currentTexOffsetY;
|
||||
int page;
|
||||
int currentPage;
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
@ -319,7 +319,7 @@ bool CNew3D::DrawModel(UINT32 modelAddr)
|
|||
// update texture offsets
|
||||
m->textureOffsetX = m_nodeAttribs.currentTexOffsetX;
|
||||
m->textureOffsetY = m_nodeAttribs.currentTexOffsetY;
|
||||
m->page = m_nodeAttribs.page;
|
||||
m->page = m_nodeAttribs.currentPage;
|
||||
|
||||
if (!cached) {
|
||||
CacheModel(m, modelAddress);
|
||||
|
@ -379,7 +379,7 @@ void CNew3D::DescendCullingNode(UINT32 addr)
|
|||
if ((node[0x02] & 0x8000)) {
|
||||
m_nodeAttribs.currentTexOffsetX = tx;
|
||||
m_nodeAttribs.currentTexOffsetY = ty;
|
||||
m_nodeAttribs.page = (node[0x02] & 0x4000) >> 14;
|
||||
m_nodeAttribs.currentPage = (node[0x02] & 0x4000) >> 14;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue