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