Fix white-space in demos
This commit is contained in:
committed by
Vadim Zeitlin
parent
7c1ab06ea5
commit
a6f6f75d12
@@ -27,7 +27,7 @@ private:
|
|||||||
ScoreFile* m_scoreFile;
|
ScoreFile* m_scoreFile;
|
||||||
wxButton* m_OK;
|
wxButton* m_OK;
|
||||||
|
|
||||||
wxDECLARE_EVENT_TABLE();
|
wxDECLARE_EVENT_TABLE();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -431,10 +431,10 @@ void LifeFrame::OnMenu(wxCommandEvent& event)
|
|||||||
m_running = true;
|
m_running = true;
|
||||||
m_topspeed = true;
|
m_topspeed = true;
|
||||||
UpdateUI();
|
UpdateUI();
|
||||||
|
|
||||||
const long YIELD_INTERVAL = 1000 / 30;
|
const long YIELD_INTERVAL = 1000 / 30;
|
||||||
wxMilliClock_t lastyield = 0, now;
|
wxMilliClock_t lastyield = 0, now;
|
||||||
|
|
||||||
while (m_running && m_topspeed)
|
while (m_running && m_topspeed)
|
||||||
{
|
{
|
||||||
OnStep();
|
OnStep();
|
||||||
@@ -444,7 +444,7 @@ void LifeFrame::OnMenu(wxCommandEvent& event)
|
|||||||
lastyield = now;
|
lastyield = now;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -797,17 +797,17 @@ void LifeCanvas::DrawCell(wxInt32 i, wxInt32 j, wxDC &dc)
|
|||||||
void LifeCanvas::DrawChanged()
|
void LifeCanvas::DrawChanged()
|
||||||
{
|
{
|
||||||
wxClientDC dc(this);
|
wxClientDC dc(this);
|
||||||
|
|
||||||
size_t ncells;
|
size_t ncells;
|
||||||
LifeCell *cells;
|
LifeCell *cells;
|
||||||
bool done = false;
|
bool done = false;
|
||||||
|
|
||||||
m_life->BeginFind(m_viewportX,
|
m_life->BeginFind(m_viewportX,
|
||||||
m_viewportY,
|
m_viewportY,
|
||||||
m_viewportX + m_viewportW,
|
m_viewportX + m_viewportW,
|
||||||
m_viewportY + m_viewportH,
|
m_viewportY + m_viewportH,
|
||||||
true);
|
true);
|
||||||
|
|
||||||
if (m_cellsize == 1)
|
if (m_cellsize == 1)
|
||||||
{
|
{
|
||||||
dc.SetPen(*wxWHITE_PEN);
|
dc.SetPen(*wxWHITE_PEN);
|
||||||
@@ -818,11 +818,11 @@ void LifeCanvas::DrawChanged()
|
|||||||
dc.SetBrush(*wxWHITE_BRUSH);
|
dc.SetBrush(*wxWHITE_BRUSH);
|
||||||
}
|
}
|
||||||
dc.SetLogicalFunction(wxXOR);
|
dc.SetLogicalFunction(wxXOR);
|
||||||
|
|
||||||
while (!done)
|
while (!done)
|
||||||
{
|
{
|
||||||
done = m_life->FindMore(&cells, &ncells);
|
done = m_life->FindMore(&cells, &ncells);
|
||||||
|
|
||||||
for (size_t m = 0; m < ncells; m++)
|
for (size_t m = 0; m < ncells; m++)
|
||||||
DrawCell(cells[m].i, cells[m].j, dc);
|
DrawCell(cells[m].i, cells[m].j, dc);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user