store bookkeeping in a map; save to XML
show total coins in bookkeeping don't wipe out old bookkeeping data, so "total" doesn't become meaningless after a year of data (or after the date has been changed a couple times) the XML is ~2megs for four years of data and takes about a second to save on my system (reasonable enough)
This commit is contained in:
@@ -145,6 +145,9 @@ void ScreenBookkeeping::ChangeView( View newView )
|
||||
float fAverage = iTotalLast/(float)NUM_LAST_DAYS;
|
||||
sData += ssprintf("%.1f\n",fAverage);
|
||||
|
||||
sTitle += "Grand Total\n";
|
||||
sData += ssprintf( "%i\n", BOOKKEEPER->GetCoinsTotal() );
|
||||
|
||||
m_textCols[0].SetHorizAlign( Actor::align_left );
|
||||
m_textCols[0].SetText( sTitle );
|
||||
m_textCols[1].SetText( "" );
|
||||
|
||||
Reference in New Issue
Block a user