/** * Start / extend a ballsaver * but limit the total time that we can have ballsave to something reasonable */ void ballsave_add_time (U8 secs) { if (in_tilt) return; if (timed_mode_running_p (&ball_save_mode) ) { if (timed_mode_get_timer(&ball_save_mode) < 15 ) timed_mode_reset (&ball_save_mode, 15); } else { //its not already running so start it fresh timed_mode_begin (&ball_save_mode); //starts mode with default time timed_mode_reset (&ball_save_mode, secs); //reset time to the time we want } }//end of function
void double_score_start (void) { if (timed_mode_running_p (&double_score_mode)) { timed_mode_add (&double_score_mode, 15); } else { timed_mode_begin (&double_score_mode); } }
//Once huxley mode is enabled it is started by a huxley shot (backwards to retina scan) void huxley_made(void){ play_huxley_sounds(); if (flag_test(FLAG_IS_HUXLEY_ENABLED) ) timed_mode_begin (&huxley_mode);//start mode else { score (HUXLEY_SCORE); deff_start_sync (DEFF_HUXLEY_INFO_EFFECT); sol_request_async (SOL_EJECT); //request to fire the eject sol task_sleep (TIME_300MS); flag_off(FLAG_KILL_NORMAL_EJECT); }//end of else }//end of function
/* * Default ballsaver is turned on as soon as valid * playfield is asserted. */ CALLSET_ENTRY (ballsave, valid_playfield) { #if MACHINE_BALL_SAVE_TIME > 0 #ifdef MACHINE_TZ extern U8 balls_served; /* Don't turn on the ball saver after the first ball */ if (!config_timed_game && balls_served < 2) #else if (!config_timed_game) #endif { timed_mode_begin (&ball_save_mode); timed_mode_reset (&ball_save_mode, MACHINE_BALL_SAVE_TIME); } #endif }
CALLSET_ENTRY (jets, jet_hit) { // task_recreate_gid (GID_JETS, jet_hit_task); //score_copy (temp_score, current_score); flasher_pulse (FLASH_RIGHT_HELMET); /* Make a sound, based on level */ if (!free_timer_test (timer_jets_level_up)) sound_send (jet_sounds[jets_level][jets_sound_index]); jets_sound_index++; if (jets_sound_index > 2) jets_sound_index = 0; if (timed_mode_running_p (&jets_frenzy_mode)) { score (SC_500K); } else if (score_compare (total_jets_score, score_table[SC_500K]) >= 0) { timed_mode_begin (&jets_frenzy_mode); score (SC_500K); score_add (jets_frenzy_total, score_table[SC_500K]); } else { /* Score the hit, based on level */ score_add (total_jets_score, score_table[jets_hit_scores[jets_level]]); score_long (score_table[jets_hit_scores[jets_level]]); bounded_increment (jets_hit, 255); /* Level up if needed */ if (jets_hit >= jets_needed[jets_level]) { bounded_increment (jets_level, 4); score_long (score_table[jets_level_up_scores[jets_level]]); jets_hit = 0; free_timer_restart (timer_jets_level_up, TIME_2S); sound_send (SND_WHOOSH_UP_1); } if ((score_compare (total_jets_score, score_table[SC_250K]) >= 0) && !flag_test (FLAG_250K_JETS)) callset_invoke (wheel_award_jets); deff_restart (DEFF_JET_HIT); } }
CALLSET_ENTRY (jet, door_start_tsm) { timed_mode_begin (&tsm_mode); }
CALLSET_ENTRY (prison_break, sw_claw_prison_break) { if (in_game && !in_tilt) { demotime_increment(); timed_mode_begin (&prison_break_mode);//start mode } }//end of function
//this is called from car_crash.c void start_car_chase(void) { timed_mode_begin (&car_chase_mode);//start mode }//end of function
CALLSET_ENTRY (fastlock, door_start_fast_lock) { timed_mode_begin (&fastlock_mode); }
CALLSET_ENTRY (superjets, sw_claw_super_jets) { if (in_game && !in_tilt) { demotime_increment(); timed_mode_begin (&superjets_mode);//start mode } }//end of function
CALLSET_ENTRY (slot, door_start_sslot) { timed_mode_begin (&sslot_mode); }
CALLSET_ENTRY (hitch, door_start_hitchhiker) { timed_mode_begin (&hitch_mode); }
CALLSET_ENTRY (clock_millions, door_start_clock_millions) { timed_mode_begin (&clock_millions_mode); }
void hurryup_start (void) { hurryup_multiplier = 3; fixed_ladder_reset (&hurryup_scoring); timed_mode_begin (&hurryup_mode); }