public static int pause_action(int i) { Audio.audio_play(Common.AUD_MENU, 1.0f); switch (i) { case st_pause.PAUSE_CONTINUE: Video.video_set_grab(0); return(State.goto_state(st_pause.st_continue)); case st_pause.PAUSE_RESTART: if (Progress.progress_same() != 0) { st_pause.clear_pause(); Video.video_set_grab(1); return(State.goto_state(st_play.get_st_play_ready())); } break; case st_pause.PAUSE_EXIT: Progress.progress_stat(GAME.GAME_NONE); st_pause.clear_pause(); Audio.audio_music_stop(); return(State.goto_state(st_over.get_st_ball_over())); } return(1); }
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); }
internal override int OnKeybd(Alt.GUI.Keys c, int d) { if (d != 0) { if (Config.config_tst_d(Config.CONFIG_KEY_RESTART, c) != 0 && Progress.progress_same_avail() != 0) { if (Progress.progress_same() != 0) { State.goto_state(st_play.get_st_play_ready()); } } } 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); }
internal override int OnKeybd(Alt.GUI.Keys c, int d) { if (d != 0) { if (Config.config_tst_d(Config.CONFIG_KEY_CAMERA_R, c) != 0) { st_play.view_rotate = +1; } if (Config.config_tst_d(Config.CONFIG_KEY_CAMERA_L, c) != 0) { st_play.view_rotate = -1; } if (Config.config_tst_d(Config.CONFIG_KEY_ROTATE_FAST, c) != 0) { st_play.fast_rotate = 1; } st_play.keybd_camera(c); if (Config.config_tst_d(Config.CONFIG_KEY_RESTART, c) != 0 && Progress.progress_same_avail() != 0) { if (Progress.progress_same() != 0) { State.goto_state(st_play.get_st_play_ready()); } } if (Config.config_tst_d(Config.CONFIG_KEY_PAUSE, c) != 0) { st_pause.goto_pause(); } } else { if (Config.config_tst_d(Config.CONFIG_KEY_CAMERA_R, c) != 0) { st_play.view_rotate = 0; } if (Config.config_tst_d(Config.CONFIG_KEY_CAMERA_L, c) != 0) { st_play.view_rotate = 0; } if (Config.config_tst_d(Config.CONFIG_KEY_ROTATE_FAST, c) != 0) { st_play.fast_rotate = 0; } } if (d != 0 && c == Alt.GUI.Keys.F12 && Config.config_cheat() != 0) { return(State.goto_state(st_play.get_st_look())); } if (d != 0 && c == Alt.GUI.Keys.F6) { st_play.show_hud = //!st_play.show_hud; st_play.show_hud == 0 ? 1 : 0; } if (d != 0 && c == Alt.GUI.Keys.C && Config.config_cheat() != 0) { Progress.progress_stat(GAME.GAME_GOAL); return(State.goto_state(st_goal.get_st_ball_goal())); } return(1); }