Browse Source

fix tetris code to compile without scrolltext engine

feature/2015
kju 15 years ago
parent
commit
4cb6e44ced
  1. 4
      games/tetris/highscore.c
  2. 2
      games/tetris/view.c

4
games/tetris/highscore.c

@ -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
}

2
games/tetris/view.c

@ -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
}

Loading…
Cancel
Save