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:
Glenn Maynard
2005-05-05 08:18:52 +00:00
parent e3456971d2
commit 1ffcc7207c
3 changed files with 176 additions and 143 deletions
+3
View File
@@ -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( "" );