mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-07-04 12:35:52 +00:00
Initialization fix
This commit is contained in:
parent
577dee5291
commit
c40079646d
@ -73,11 +73,11 @@ void Table::RowsView::_setRowVerts(const boo::SWindowRect& sub, const boo::SWind
|
|||||||
int startIdx = std::max(0, int(m_t.m_rows) - idx);
|
int startIdx = std::max(0, int(m_t.m_rows) - idx);
|
||||||
|
|
||||||
size_t r, c;
|
size_t r, c;
|
||||||
for (r=0 ; r<SPECTER_TABLE_MAX_ROWS && (sub.location[1] + yOff + spacing) >= scissor.location[1] ; ++r)
|
for (r=0, c=0 ; r<SPECTER_TABLE_MAX_ROWS && (sub.location[1] + yOff + spacing) >= scissor.location[1] ; ++r)
|
||||||
{
|
{
|
||||||
const Zeus::CColor& color = (r&1) ? theme.tableCellBg1() : theme.tableCellBg2();
|
const Zeus::CColor& color = (r&1) ? theme.tableCellBg1() : theme.tableCellBg2();
|
||||||
int xOff = 0;
|
int xOff = 0;
|
||||||
for (c=0 ; c<std::min(SPECTER_TABLE_MAX_COLUMNS, m_t.m_columns) ; ++c)
|
for (c=0 ; c<std::min(size_t(SPECTER_TABLE_MAX_COLUMNS), m_t.m_columns) ; ++c)
|
||||||
{
|
{
|
||||||
v[0].m_pos.assign(xOff + margin, yOff - margin, 0);
|
v[0].m_pos.assign(xOff + margin, yOff - margin, 0);
|
||||||
v[0].m_color = color;
|
v[0].m_color = color;
|
||||||
@ -96,7 +96,8 @@ void Table::RowsView::_setRowVerts(const boo::SWindowRect& sub, const boo::SWind
|
|||||||
}
|
}
|
||||||
m_visibleStart = startIdx;
|
m_visibleStart = startIdx;
|
||||||
m_visibleRows = r;
|
m_visibleRows = r;
|
||||||
m_vertsBuf->load(m_verts, sizeof(SolidShaderVert) * 6 * r * c);
|
if (r * c)
|
||||||
|
m_vertsBuf->load(m_verts, sizeof(SolidShaderVert) * 6 * r * c);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Table::setMultiplyColor(const Zeus::CColor& color)
|
void Table::setMultiplyColor(const Zeus::CColor& color)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user