void restart() { removeAllTimers(); isNewGame = true; isNewGame = 1; initGameScreen(); }
void gameOver() { removeAllTimers(); draw_string("GAME OVER", GAME_OVER_COLOR, (point_t){GAMEBUFFER_WIDTH/2-(9/2*FONT_COLS_OFFSET), GAMEBUFFER_HEIGHT/2}, false); isNewGame = true; gameLevel = 1; addTimer(10000, false, &initGameScreen); }
void nextLevel() { removeAllTimers(); char* nextLevelText = "Level "; gameLevel++; char tens = gameLevel % 10; nextLevelText[6] = ((tens) ? (tens) : ' ') + '0'; nextLevelText[7] = (gameLevel - tens*10) + '0'; draw_string(nextLevelText, SCORE_ABC_COLOR, (point_t){GAMEBUFFER_WIDTH/2-(9/2*FONT_COLS_OFFSET), GAMEBUFFER_HEIGHT/2}, false); isNewGame = false; addTimer(3000, false, &initGameScreen); }
LLSpeakersDelayActionsStorage::~LLSpeakersDelayActionsStorage() { removeAllTimers(); }