fix tetris code to compile without scrolltext engine

This commit is contained in:
kju 2010-01-13 19:24:10 +00:00
parent a248bf06d9
commit 4cb6e44ced
2 changed files with 5 additions and 1 deletions

View File

@ -14,6 +14,7 @@
*/
uint16_t tetris_highscore_inputName(void)
{
#ifdef SCROLLTEXT_SUPPORT
char pszNick[4], pszTmp[40];
uint8_t nOffset;
uint8_t nPos = 0, nBlink = 0, nDone = 0, nHadfire = 0;
@ -106,4 +107,7 @@ uint16_t tetris_highscore_inputName(void)
// return result
return (pszNick[0] - 65) << 10 | (pszNick[1] - 65) << 5 | (pszNick[2] - 65);
#else
return (0);
#endif
}

View File

@ -463,6 +463,7 @@ void tetris_view_formatHighscoreName(uint16_t nHighscoreName, char *pszName)
*/
void tetris_view_showResults(tetris_view_t *pV)
{
#ifdef SCROLLTEXT_SUPPORT
char pszResults[54], pszHighscoreName[4];
uint16_t nScore = tetris_logic_getScore(pV->pLogic);
uint16_t nHighscore = tetris_logic_getHighscore(pV->pLogic);
@ -482,7 +483,6 @@ void tetris_view_showResults(tetris_view_t *pV)
snprintf(pszResults, sizeof(pszResults),
"</#Lines %u New Highscore %u", nLines, nScore);
}
#ifdef SCROLLTEXT_SUPPORT
scrolltext(pszResults);
#endif
}