static void logic(void) { handleKeyboard(); scrollBackground(-0.25, 0); doStars(0.5, 0); planet.x -= 0.25; if (planet.x <= -200) { planet.x = SCREEN_WIDTH + 128 + (rand() % SCREEN_WIDTH); planet.y = (rand() % SCREEN_HEIGHT - 128); } switch (show) { case SHOW_CHALLENGES: doChallenges(); break; case SHOW_MENU: break; case SHOW_STATS: break; case SHOW_OPTIONS: break; } doWidgets(); app.doTrophyAlerts = 1; }
static void logic(void) { handleKeyboard(); scrollBackground(0, 0.25); doStars(0, -0.5); earth.y += 0.1; if (earth.y > SCREEN_HEIGHT + 128) { earth.x = rand() % SCREEN_WIDTH; earth.y = -(128 + (rand() % 128)); } doFighters(); doEffects(); app.doTrophyAlerts = 1; if (show == SHOW_FIGHTER_DB) { doFighterDatabase(); } doWidgets(); }
static void logic(void) { handleKeyboard(); scrollBackground(0, 0.25); doStars(0, -0.5); earth.y += 0.1; if (earth.y > SCREEN_HEIGHT + 128) { earth.x = rand() % SCREEN_WIDTH; earth.y = -(128 + (rand() % 128)); } doFighters(); doEffects(); doWidgets(); }