|
From: Chad M. <cmm...@us...> - 2005-05-29 15:17:56
|
Update of /cvsroot/seq/showeq/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10850/src Modified Files: Tag: pre_5_0_beta interface.cpp player.cpp Log Message: Cleaned up the status bar AA exp and exp display by adding percent to exp and fixing a division weirdness in AA. Index: player.cpp =================================================================== RCS file: /cvsroot/seq/showeq/src/player.cpp,v retrieving revision 1.42.6.12 retrieving revision 1.42.6.13 diff -u -d -r1.42.6.12 -r1.42.6.13 --- player.cpp 15 May 2005 16:06:25 -0000 1.42.6.12 +++ player.cpp 29 May 2005 15:17:29 -0000 1.42.6.13 @@ -585,7 +585,7 @@ else expIncrement = 0; */ - uint32_t realExp = altexp->altexp * (15000000 / 33000); + uint32_t realExp = altexp->altexp * (15000000 / 330); uint32_t expIncrement; if (realExp > m_currentExp) Index: interface.cpp =================================================================== RCS file: /cvsroot/seq/showeq/src/interface.cpp,v retrieving revision 1.67.6.15 retrieving revision 1.67.6.16 diff -u -d -r1.67.6.15 -r1.67.6.16 --- interface.cpp 10 May 2005 16:11:55 -0000 1.67.6.15 +++ interface.cpp 29 May 2005 15:17:29 -0000 1.67.6.16 @@ -4306,10 +4306,13 @@ uint32_t tickExpLevel) { if (m_stsbarExp) - m_stsbarExp->setText(QString("Exp: %1; %2 (%3/330); 1/330 = %4") - .arg(Commanate(totalExp)) - .arg(Commanate(totalExp - minExpLevel)) - .arg(totalTick).arg(tickExpLevel)); + { + char expperc[5]; + sprintf(expperc, "%.2f", totalTick*100.0/330.0); + + m_stsbarExp->setText(QString("Exp: %1 (%2/330, %3%)") + .arg(Commanate(totalExp)).arg(totalTick).arg(expperc)); + } } void EQInterface::newExp(uint32_t newExp, uint32_t totalExp, @@ -4333,10 +4336,13 @@ .arg(needKills)); if (m_stsbarExp) - m_stsbarExp->setText(QString("Exp: %1; %2 (%3/330) [%4]") - .arg(Commanate(totalExp)) - .arg(Commanate(intoExp)) - .arg(totalTick).arg(needKills)); + { + char expperc[5]; + sprintf(expperc, "%.2f", totalTick*100.0/330.0); + + m_stsbarExp->setText(QString("Exp: %1 (%2/330, %3%)") + .arg(Commanate(totalExp)).arg(totalTick).arg(expperc)); + } } else { @@ -4347,10 +4353,13 @@ .arg(totalTick).arg(Commanate(leftExp))); if (m_stsbarExp) - m_stsbarExp->setText(QString("Exp: %1; %2 (%3/330)") - .arg(Commanate(totalExp)) - .arg(Commanate(intoExp)) - .arg(totalTick)); + { + char expperc[5]; + sprintf(expperc, "%.2f", totalTick*100.0/330.0); + + m_stsbarExp->setText(QString("Exp: %1 (%2/330, %3%)") + .arg(Commanate(totalExp)).arg(totalTick).arg(expperc)); + } } } @@ -4370,7 +4379,7 @@ if (m_stsbarExpAA) { char aaperc[5]; - sprintf(aaperc, "%.2f", totalExp*100.0/maxExp); + sprintf(aaperc, "%.2f", totalTick*100.0/330.0); m_stsbarExpAA->setText(QString("ExpAA: %1 (%2/330, %3%)") .arg(Commanate(totalExp)).arg(totalTick).arg(aaperc)); |