//************************************************************************ void CNutDropScene::UpdateSpriteScore (LPSPRITE lpScore1, LPSPRITE lpScore2, int iScore) //************************************************************************ { if (!lpScore1 || !lpScore2) return; int iTmp = iScore; if (iTmp > 99) return; if (iTmp < 10) { lpScore2->SetCurrentCell (iTmp); lpScore2->Draw(); } else { lpScore1->SetCurrentCell (iTmp / 10); while (iTmp > 10) iTmp -= 10; if (iTmp == 10) iTmp = 0; lpScore2->SetCurrentCell (iTmp); lpScore1->Draw(); lpScore2->Draw(); } }
//************************************************************************ void CNutDropScene::ResetSpriteScore (LPSPRITE lpScore1, LPSPRITE lpScore2) //************************************************************************ { if (!lpScore1 || !lpScore2) return; lpScore1->SetCurrentCell (m_nScoreCells - 1); lpScore2->SetCurrentCell (0); lpScore1->Draw(); lpScore2->Draw(); }