public static int fall_out_action(int i) { Audio.audio_play(Common.AUD_MENU, 1.0f); switch (i) { case FALL_OUT_BACK: /* Fall through. */ case FALL_OUT_OVER: return(State.goto_state(st_over.get_st_ball_over())); case FALL_OUT_NEXT: if (Progress.progress_next() != 0) { return(State.goto_state(st_level.get_st_level())); } break; case FALL_OUT_SAME: if (Progress.progress_same() != 0) { return(State.goto_state(st_level.get_st_level())); } break; } return(1); }
public static int goal_action(int i) { Audio.audio_play(Common.AUD_MENU, 1.0f); switch (i) { case GOAL_BACK: /* Fall through. */ case GOAL_OVER: return(State.goto_state(st_over.get_st_ball_over())); case GOAL_DONE: Progress.progress_exit(); return(State.goto_state(st_done.get_st_done())); case GOAL_LAST: return(State.goto_state(st_start.get_st_start())); case Util.GUI_MOST_COINS: case Util.GUI_BEST_TIMES: case Util.GUI_FAST_UNLOCK: Util.gui_score_set(i); resume = 1; return(State.goto_state(get_st_ball_goal())); case GOAL_NEXT: if (Progress.progress_next() != 0) { return(State.goto_state(st_level.get_st_level())); } break; case GOAL_SAME: if (Progress.progress_same() != 0) { return(State.goto_state(st_level.get_st_level())); } break; } return(1); }