fix tetris code to compile without scrolltext engine
This commit is contained in:
parent
a248bf06d9
commit
4cb6e44ced
|
@ -14,6 +14,7 @@
|
||||||
*/
|
*/
|
||||||
uint16_t tetris_highscore_inputName(void)
|
uint16_t tetris_highscore_inputName(void)
|
||||||
{
|
{
|
||||||
|
#ifdef SCROLLTEXT_SUPPORT
|
||||||
char pszNick[4], pszTmp[40];
|
char pszNick[4], pszTmp[40];
|
||||||
uint8_t nOffset;
|
uint8_t nOffset;
|
||||||
uint8_t nPos = 0, nBlink = 0, nDone = 0, nHadfire = 0;
|
uint8_t nPos = 0, nBlink = 0, nDone = 0, nHadfire = 0;
|
||||||
|
@ -106,4 +107,7 @@ uint16_t tetris_highscore_inputName(void)
|
||||||
|
|
||||||
// return result
|
// return result
|
||||||
return (pszNick[0] - 65) << 10 | (pszNick[1] - 65) << 5 | (pszNick[2] - 65);
|
return (pszNick[0] - 65) << 10 | (pszNick[1] - 65) << 5 | (pszNick[2] - 65);
|
||||||
|
#else
|
||||||
|
return (0);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -463,6 +463,7 @@ void tetris_view_formatHighscoreName(uint16_t nHighscoreName, char *pszName)
|
||||||
*/
|
*/
|
||||||
void tetris_view_showResults(tetris_view_t *pV)
|
void tetris_view_showResults(tetris_view_t *pV)
|
||||||
{
|
{
|
||||||
|
#ifdef SCROLLTEXT_SUPPORT
|
||||||
char pszResults[54], pszHighscoreName[4];
|
char pszResults[54], pszHighscoreName[4];
|
||||||
uint16_t nScore = tetris_logic_getScore(pV->pLogic);
|
uint16_t nScore = tetris_logic_getScore(pV->pLogic);
|
||||||
uint16_t nHighscore = tetris_logic_getHighscore(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),
|
snprintf(pszResults, sizeof(pszResults),
|
||||||
"</#Lines %u New Highscore %u", nLines, nScore);
|
"</#Lines %u New Highscore %u", nLines, nScore);
|
||||||
}
|
}
|
||||||
#ifdef SCROLLTEXT_SUPPORT
|
|
||||||
scrolltext(pszResults);
|
scrolltext(pszResults);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue