Ejemplo n.º 1
0
CALLSET_ENTRY (tilt, sw_tilt)
{
	extern U8 in_tilt;

	/* Ignore tilt switch activity while already in tilt state.
	 * But restart the timer that tells us that the tilt is still
	 * moving, so we can delay endball. */
	if (in_tilt)
	{
		free_timer_restart (TIM_IGNORE_TILT, TIME_2S);
		return;
	}

	/* IDEA : Disable tilt while a ball search is in progress? */

	else if (++tilt_warnings == system_config.tilt_warnings)
	{
		/* Warnings exceeded... tilt the current ball */
		sound_reset ();
#ifdef CONFIG_GI
		gi_disable (PINIO_GI_STRINGS);
#endif
		deff_start (DEFF_TILT);
		leff_start (LEFF_TILT);
		free_timer_restart (TIM_IGNORE_TILT, TIME_2S);
		in_tilt = TRUE;
		task_remove_duration (TASK_DURATION_LIVE);
		task_duration_expire (TASK_DURATION_LIVE);
		flipper_disable ();
		set_valid_playfield ();
		audit_increment (&system_audits.tilts);
		audit_increment (&system_audits.plumb_bob_tilts);
		callset_invoke (tilt);
	}
	else
	{
		/* Give a warning this time */
		deff_start (DEFF_TILT_WARNING);
		leff_start (LEFF_TILT_WARNING);
		callset_invoke (tilt_warning);
	}
}
Ejemplo n.º 2
0
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);
	}

}