コード例 #1
0
ファイル: tnf.c プロジェクト: SonnyJim/freewpc
void tnf_exit_deff (void)
{	
	dmd_alloc_pair_clean ();
	U16 fno;
	sound_send (SND_CLOCK_CHAOS_END_BOOM);
	for (fno = IMG_EXPLODE_START; fno <= IMG_EXPLODE_END; fno += 2)
	{
		dmd_map_overlay ();
		dmd_clean_page_low ();
		
		sprintf_score (tnf_score);
		font_render_string_center (&font_fixed6, 64, 8, sprintf_buffer);
		font_render_string_center (&font_var5, 64, 20, "POINTS EARNED FROM DOINKS");
		dmd_text_outline ();
		dmd_alloc_pair ();
		frame_draw (fno);
		dmd_overlay_outline ();
		dmd_show2 ();
		task_sleep (TIME_33MS);
	}
	if (tnf_buttons_pressed >= tnf_target)
		sound_send (SND_OOH_GIMME_SHELTER);
	else
		sound_send (SND_RETURN_TO_YOUR_HOMES);
	dmd_alloc_pair_clean ();
	sprintf_score (tnf_score);
	font_render_string_center (&font_fixed6, 64, 8, sprintf_buffer);
	font_render_string_center (&font_var5, 64, 20, "POINTS EARNED FROM DOINKS");
	dmd_copy_low_to_high ();
	dmd_show2 ();
	task_sleep_sec (2);
	deff_exit ();
}
コード例 #2
0
CALLSET_ENTRY (clock_millions, sw_clock_target)
{
	
	if (timed_mode_running_p (&clock_millions_mode))
	{
		leff_start (LEFF_CLOCK_TARGET);
		/* Award bonus if hit 6 times */
		if (++clock_mode_hits > 5)
		{
			sound_send (SND_EXPLOSION_3);
			score (SC_20M);
			score_add (clock_mode_score, score_table[SC_20M]);
			deff_start (DEFF_CLOCK_MILLIONS_EXPLODE);
			timed_mode_end (&clock_millions_mode);
		}
		else
		{
			sound_send (SND_CLOCK_BELL);
			score (SC_5M);
			score_add (clock_mode_score, score_table[SC_5M]);	
			deff_start (DEFF_CLOCK_MILLIONS_HIT);
		}
		if (!global_flag_test (GLOBAL_FLAG_CHAOSMB_RUNNING))
			tz_clock_reverse_direction ();
		tz_clock_set_speed (clock_mode_hits);
	}
	else if (!global_flag_test (GLOBAL_FLAG_CHAOSMB_RUNNING))
	{
		callset_invoke (sw_jet_noflash);
		score (SC_50K);
		sound_send (SND_NO_CREDITS);
	}
}
コード例 #3
0
ファイル: leftramp.c プロジェクト: SonnyJim/freewpc
static inline void left_ramp_speech_subtask (void)
{
	switch (left_ramps)
	{
		default:
			break;
		case 3:
			sound_send (SND_MOST_UNUSUAL_CAMERA);
			break;
		case 6:
			sound_send (SND_THIS_IS_NO_ORDINARY_GUMBALL);
			break;
		case 10:
			if (can_award_extra_ball ())
				sound_send (SND_GET_THE_EXTRA_BALL);
			else
				sound_send (SND_TEN_MILLION_POINTS);
			break;
		case 20:	
			sound_send (SND_YES);
			break;
	}


}
コード例 #4
0
ファイル: tz_amode.c プロジェクト: SonnyJim/freewpc
static void amode_talking_task (void)
{
	sound_send (SND_NOT_AN_ORDINARY_DAY);
	task_sleep_sec (2);
	sound_send (SND_OR_AN_ORDINARY_PLAYER);
	task_exit ();
}
コード例 #5
0
ファイル: unlit.c プロジェクト: SonnyJim/freewpc
void award_unlit_shot (U8 unlit_called_from)
{
    if (can_award_unlit_shot (unlit_called_from))
    {
        unlit_shot_count++;
        /* Don't allow collecting from Hitchhiker or jets */
        if (unlit_shot_count > 4 && unlit_called_from != (SW_HITCHHIKER)
                && unlit_called_from != (SW_BOTTOM_JET))
        {
            sound_send (SND_JUST_TAKEN_A_DETOUR);
            deff_start (DEFF_BACKDOOR_AWARD);
            backdoor_award_collected = TRUE;
            unlit_shot_count = 0;
            callset_invoke (award_door_panel);
        }
        /* Reset if the player hits the same unlit shot twice */
        if (unlit_called_from == unlit_called_from_stored)
            unlit_shot_count = 0;
        if (unlit_shot_count == 4 )
        {
            //TODO Check for unlit shots
            /* Hint to the player that backdoor award is ready */
            sound_send (SND_TWILIGHT_ZONE_SHORT_SOUND);
        }
        /* Store where we were called from */
        unlit_called_from_stored = unlit_called_from;
    }
}
コード例 #6
0
ファイル: tnf.c プロジェクト: SonnyJim/freewpc
static void tnf_sound_task (void)
{
	if (tnf_buttons_pressed < tnf_target - 10)
		sound_send (SND_BUYIN_CANCELLED);
	else
		sound_send (SND_CLOCK_CHAOS_END_BOOM);
	task_exit ();
}
コード例 #7
0
ファイル: sssmb.c プロジェクト: SonnyJim/freewpc
void sssmb_jackpot_collected_deff (void)
{
	dmd_alloc_low_clean ();
	font_render_string_center (&font_term6, 64, 10, "SKILL JACKPOT");
	printf_millions (sssmb_jackpot_value);
	font_render_string_center (&font_fixed6, 64, 21, sprintf_buffer);
	sound_send (SND_SKILL_SHOT_CRASH_3);
	dmd_show_low ();
	task_sleep_sec (1);
	sound_send (SND_SKILL_SHOT_CRASH_3);
	task_sleep_sec (1);
	deff_exit ();
}
コード例 #8
0
ファイル: leftramp.c プロジェクト: Curbfeeler/freewpc
CALLSET_ENTRY (leftramp, sw_left_ramp_enter)
{
	if (!event_did_follow (left_ramp, left_ramp_fail))
	{
		sound_send (SND_SHUTTLE_LAUNCH);
		deff_start (DEFF_SHUTTLE_LAUNCH);
		head_divert_to_mpf ();
	}
	else
	{
		sound_send (SND_ABORT_ABORT);
	}
	event_can_follow (left_ramp, left_ramp_fail, TIME_2S);
}
コード例 #9
0
ファイル: match.c プロジェクト: Dave2084/freewpc
/** The display effect that runs to show the match.
 * This is a default effect that could be overriden with something
 * more flashy. */
void
match_deff (void)
{
	U8 value;
	U8 n;
	U8 last_value = 0xFF;

#if (MACHINE_DMD == 1)
	match_draw_scores ();
#endif

	for (n=0; n < 20; n++)
	{
		if (n == 19)
			value = match_value;
		else
		{
			do {
				value = random_scaled (10) * 0x10;
			} while (value == last_value);
		}
		last_value = value;

#ifdef MACHINE_TZ
		if (n == 19 && match_count)
			sound_send (SND_JET_BUMPER_ADDED);
		else
			sound_send (SND_HITCHHIKER_COUNT);
#endif

		dmd_alloc_low_clean ();
#if (MACHINE_DMD == 1)
		dmd_overlay ();
#else
		match_draw_scores ();
#endif
		sprintf ("%02X", value);
		font_render_string_right (&font_fixed6, 126, 22, sprintf_buffer);
		dmd_show_low ();
		task_sleep (TIME_100MS);
	}

	if (match_count)
	{
		callset_invoke (match_awarded);
	}

	task_sleep_sec (2);
	deff_exit ();
}
コード例 #10
0
ファイル: jets.c プロジェクト: SonnyJim/freewpc
void sw_jet_sound (void)
{
	if (!in_live_game)
		return;
	jet_sound_index = random_scaled(3);
	if (timed_mode_running_p (&tsm_mode))
		sound_send (super_jet_sounds[jet_sound_index]);
	else
		sound_send (jet_sounds[jet_sound_index]);
	/* Hack to stop slings and clock target from flashing jets */	
	if (!noflash)
		flasher_pulse (FLASH_JETS);
	noflash = FALSE;
	task_exit ();
}
コード例 #11
0
ファイル: effect.c プロジェクト: Dmilo/freewpc
void coin_door_power_deff (void)
{
	U8 n;
	for (n=0; n < 5; n++)
	{
		dmd_alloc_low_clean ();
		dmd_show_low ();
		task_sleep (TIME_200MS);

		dmd_alloc_low_clean ();
#if (MACHINE_DMD == 1)
		font_render_string_center (&font_fixed6, 64, 6, "COIN DOOR IS OPEN");
		font_render_string_center (&font_fixed6, 64, 16, "HIGH POWER");
		font_render_string_center (&font_fixed6, 64, 26, "IS DISABLED");
#else
		font_render_string_center (&font_fixed6, 64, 10, "HIGH POWER");
		font_render_string_center (&font_fixed6, 64, 21, "IS DISABLED");
#endif
		dmd_show_low ();
		sound_send (SND_TEST_ALERT);
		task_sleep (TIME_300MS);
	}
	task_sleep_sec (3);
	deff_exit ();
}
コード例 #12
0
void clock_millions_explode_deff (void)
{	
	dmd_alloc_pair_clean ();
	U16 fno;
	sound_send (SND_GREED_MODE_BOOM);
	for (fno = IMG_EXPLODE_START; fno <= IMG_EXPLODE_END; fno += 2)
	{
		dmd_map_overlay ();
		dmd_clean_page_low ();
		font_render_string_center (&font_fixed6, 64, 10, "CLOCK DESTROYED");
		font_render_string_center (&font_var5, 64, 21, "20 MILLION");
		dmd_text_outline ();
		dmd_alloc_pair ();
		frame_draw (fno);
		dmd_overlay_outline ();
		dmd_show2 ();
		task_sleep (TIME_33MS);
	}
	dmd_alloc_pair_clean ();
	font_render_string_center (&font_fixed6, 64, 10, "CLOCK DESTROYED");
	font_render_string_center (&font_var5, 64, 21, "20 MILLION");
	dmd_copy_low_to_high ();
	dmd_show2 ();
	task_sleep_sec (2);
	deff_exit ();
}
コード例 #13
0
ファイル: coin.c プロジェクト: hydra/freewpc
/** Increment the units counter for a particular slot. */
void add_units (U8 n)
{
	csum_area_check (&coin_csum_info);
	if (credit_count >= price_config.max_credits)
		return;

	nvram_add (unit_count, n);
	if (unit_count >= price_config.units_per_credit)
	{
		while (unit_count >= price_config.units_per_credit)
		{
			nvram_subtract (unit_count, price_config.units_per_credit);
			add_credit ();
			audit_increment (&system_audits.paid_credits);
		}
		callset_invoke (add_credits);
	}
	else
	{
#ifdef MACHINE_ADD_COIN_SOUND
		sound_send (MACHINE_ADD_COIN_SOUND);
#endif
		callset_invoke (add_partial_credits);
		announce_credits ();
	}
	csum_area_update (&coin_csum_info);
	pinio_nvram_lock ();
}
コード例 #14
0
ファイル: sssmb.c プロジェクト: SonnyJim/freewpc
static void sssmb_award_jackpot (void)
{
	if (!task_kill_gid (GID_SSSMB_JACKPOT_READY))
		return;

	mball_jackpot_uncollected = FALSE;
	sssmb_initial_ramps_to_divert++;
	if (feature_config.dixon_anti_cradle == YES)
		sssmb_jackpot_value += 5;
	score_1M (sssmb_jackpot_value);
	leff_start (LEFF_PIANO_JACKPOT_COLLECTED);
	deff_start (DEFF_JACKPOT);
	deff_start (DEFF_SSSMB_JACKPOT_COLLECTED);
	sound_send (SND_EXPLOSION_1);

	/* score it */

	if (sssmb_jackpot_value < 100)
		sssmb_jackpot_value += 10;
	sssmb_ramps_to_divert = sssmb_initial_ramps_to_divert;

	if (!global_flag_test (GLOBAL_FLAG_SSSMB_RED_JACKPOT)
		&& !global_flag_test (GLOBAL_FLAG_SSSMB_ORANGE_JACKPOT)
		&& !global_flag_test (GLOBAL_FLAG_SSSMB_YELLOW_JACKPOT))
	{
		sssmb_relight_all_jackpots ();
	}
}
コード例 #15
0
ファイル: pb_lock.c プロジェクト: SonnyJim/freewpc
void lock_powerball_deff (void)
{
	sound_send (SND_TOO_HOT_TO_HANDLE);
	U16 fno;
	dmd_alloc_pair_clean ();
	timer_restart_free (GID_LOCK_POWERBALL, TIME_5S);
	while (task_find_gid (GID_LOCK_POWERBALL))
	{
		ball_search_timer_reset ();
		for (fno = IMG_POWERBALL_START; fno <= IMG_POWERBALL_END; fno += 2)
		{
			dmd_map_overlay ();
			dmd_clean_page_low ();
			font_render_string_center (&font_fireball, 64, 9, "LOCK BALL");
			font_render_string_left (&font_var5, 10, 24, "LEFT: NO");
			font_render_string_right (&font_var5, 118, 24, "RIGHT: YES");
			dmd_text_outline ();

			dmd_alloc_pair ();
			frame_draw (fno);
			dmd_overlay_outline ();
			dmd_show2 ();
			task_sleep (TIME_33MS);
		}
	}
	deff_exit ();
}
コード例 #16
0
ファイル: huxley.c プロジェクト: CardonaPinball/freewpc_DM
void huxley_hit_sounds_task(void) {
	U8 i;
	for (i = 0; i < 3; i++) {
		sound_send (EXPLOSION1_SHORT);
		task_sleep (TIME_100MS);
	}
	sound_send (EXPLOSION1_MED);
	task_sleep (TIME_100MS);
	for (i = 0; i < 3; i++) {
		sound_send (EXPLOSION1_LONG);
		task_sleep (TIME_500MS);
	}
	play_huxley_sounds();

	task_exit();
}//end of mode_effect_deff
コード例 #17
0
ファイル: config.c プロジェクト: Curbfeeler/freewpc
CALLSET_ENTRY (tz, add_player)
{
#ifdef CONFIG_TZONE_IP
	if (num_players > 1)
		sound_send (SND_PLAYER_ONE + num_players - 1);
#endif
}
コード例 #18
0
ファイル: gumball.c プロジェクト: SonnyJim/freewpc
/* Called by the right loop magnet to see if we should divert the ball */
void sw_gumball_right_loop_entered (void)
{
	/* Open the divertor if trying to load the gumball*/
	if (gumball_enable_from_trough && event_did_follow (autolaunch, right_loop))
	{
		magnet_disable_catch (MAG_RIGHT);
		gumball_divertor_open ();
	}
	/* Don't open if autofired into play or dropped from the lock*/
	else if (event_did_follow (autolaunch, right_loop)
		|| timer_find_gid (GID_LOCK_KICKED))
	{
	}
	/* Don't open if the magnet is about to grab the ball
	 * but remembering that it will always let the powerball through */
	else if ((magnet_enabled (MAG_RIGHT) || magnet_busy (MAG_RIGHT))
		&& !global_flag_test (GLOBAL_FLAG_POWERBALL_IN_PLAY))
	{
	}
	else if (gumball_load_is_enabled ())
	{
		gumball_divertor_open ();
		if (in_live_game && !multi_ball_play ())
		{
			sound_send (SND_GUMBALL_ENTER);
		}
	}
}
コード例 #19
0
ファイル: autofire.c プロジェクト: SonnyJim/freewpc
/** A task that manages the autolaunching of balls.
Upon entry, the autofire divertor solenoid is already pulsing
and a ball is being kicked from the trough. */
void autofire_monitor (void)
{
    /* Open the divertor to catch the ball.  Because it may be
    coming from either the trough or a ramp divert, the
    timings are variable. */
    if (shooter_div_delay_time)
        task_sleep_sec (shooter_div_delay_time);

    autofire_busy = TRUE;
    //if (autofire_full ()
    //	don't open to catch
    shooter_div_start ();
    /* TODO - If the autofire switch trips during the 'open
    time', we can abort this delay early and go ahead and
    close the divertor.  This is safe because only one
    ball can appear here at a time. */
    //task_sleep_sec (shooter_div_open_time);
    autofire_ball_catch_wait ();
    shooter_div_stop ();

    /* Wait a little longer for the ball to settle */
    task_sleep (TIME_200MS);

    /* If Right inlane -> Left ramp combo, start tnf mode */
    if (event_did_follow (left_ramp_exit, tnf) && single_ball_play ())
    {
        callset_invoke (tnf_start);
    }

    /* Wait until allowed to kickout */
    while (kickout_locks > 0)
        task_sleep (TIME_100MS);

    /* Open diverter again */
    shooter_div_start ();
    /* Wait for the diverter to fully open before firing */
    U8 timeout = 20;
    while (--timeout != 0)
        task_sleep (TIME_100MS);

    if (in_live_game && single_ball_play ())
    {
        sound_send (SND_EXPLOSION_1);
        leff_start (LEFF_STROBE_UP);
    }
    /* Say that the ball is heading into the right loop */
    timer_restart_free (GID_BALL_LAUNCH, TIME_3S);
    event_can_follow (autolaunch, right_loop, TIME_4S);
    /* Clear the magnet so we can fire a ball */
    magnet_disable_catch (MAG_RIGHT);
    /* Launch the ball */
    sol_request (SOL_AUTOFIRE);
    /* Wait for the ball to clear the divertor
     * before closing*/
    task_sleep (TIME_700MS);
    shooter_div_stop ();
    autofire_busy = FALSE;
    task_exit ();
}
コード例 #20
0
ファイル: config.c プロジェクト: Curbfeeler/freewpc
CALLSET_ENTRY (tz, start_without_credits)
{
	if (!timer_find_gid (GID_START_NO_CREDITS_DEBOUNCE))
	{
		timer_restart_free (GID_START_NO_CREDITS_DEBOUNCE, TIME_5S);
		sound_send (SND_GREEEED);
	}
}
コード例 #21
0
ファイル: jets.c プロジェクト: SonnyJim/freewpc
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);
	}

}
コード例 #22
0
ファイル: deadend.c プロジェクト: CardonaPinball/freewpc
CALLSET_ENTRY (deadend, sw_dead_end)
{
//	device_switch_can_follow (dead_end, slot, TIME_2S + TIME_500MS);
//	event_can_follow (dead_end, camera, TIME_2S);
	timer_restart_free (GID_DEADEND_TO_SLOT, TIME_4S);
	//event_can_follow (camera_or_piano, slot_prox, TIME_5S);

	if (lamp_test (LM_DEAD_END))
	{
		leff_start (LEFF_RIGHT_LOOP);
		dead_end_count++;
		deff_start_sync (DEFF_DEAD_END);
		if (!flag_test (FLAG_SNAKE_READY) && single_ball_play ())
		{
			flag_on (FLAG_SNAKE_READY);
			deff_start_sync (DEFF_SNAKE_READY);
		}
		switch (dead_end_count)
		{
			case 1:
				score (SC_250K);
				timed_game_extend (15);
				break;
			case 2:
				score (SC_500K);
				timed_game_extend (20);
				break;
			case 3:
				timed_game_extend (30);
				if (extra_ball_lit_from_deadend == FALSE 
					&& can_award_extra_ball ())
				{
					score (SC_1M);
					light_easy_extra_ball ();
					extra_ball_lit_from_deadend = TRUE;
				}
				else
				{
					score (SC_10M);
				}
				dead_end_count = 0;
				break;
			default:
				score (SC_2M);
				timed_game_extend (30);
				break;
		}
		lamp_off (LM_DEAD_END);
	}
	else
	{
		deff_start (DEFF_INLANE_LIGHTS_DEAD_END);
		award_unlit_shot (SW_DEAD_END);
		score (SC_100K);
		sound_send (SND_TOWN_SQUARE_AWARD);
		timed_game_pause (TIME_3S);
	}
}
コード例 #23
0
ファイル: jets.c プロジェクト: hydra/freewpc
CALLSET_ENTRY (jet, sw_jet)
{
	/* Hack for when mpf_exit switch breaks */
	if (!multi_ball_play () && mpf_timer > 0)
		callset_invoke (sw_mpf_exit);
	
	if (global_flag_test(GLOBAL_FLAG_POWERBALL_IN_PLAY))
		jets_scored += 2;
	else
		jets_scored++;
	
	if (jets_scored >= jets_for_bonus)
	{	
		bounded_increment (jets_bonus_level, 50);
		jets_for_bonus += 5;
		award_unlit_shot (SW_BOTTOM_JET);
		sound_send (SND_GLASS_BREAKS);
		task_sleep (TIME_500MS);
		/* jetscore is used rather than score_deff_get 
		 * because it's likely another score would of
		 * happened */
		if (jets_bonus_level < 3)
		{
			score (SC_1M);
			jetscore = 1;
		}
		else if (jets_bonus_level < 5)
		{
			score (SC_5M);
			jetscore = 5;
		}
		else if (jets_bonus_level < 7)
		{
			score (SC_10M);
			jetscore = 10;
		}
		if (!timer_find_gid (GID_HITCHHIKER))
			deff_start (DEFF_JETS_LEVEL_UP);
	}

	if (timed_mode_running_p (&tsm_mode))
	{
		score (SC_500K);
		score_add (tsm_mode_total, score_table[SC_500K]);
	}
	else
	{	
		score (SC_150K);
		/* Stop deff from restarting whilst we
		 * are showing the level up deff
		 * or when the hitch anim is running */
		if ((jets_scored <= jets_for_bonus) 
			&& (!timer_find_gid (GID_HITCHHIKER)))
			deff_restart (DEFF_JETS_HIT);
	}
	
	task_create_gid1 (GID_JET_SOUND, sw_jet_sound);
}
コード例 #24
0
ファイル: effect.c プロジェクト: Dmilo/freewpc
/** The display effect for a non-fatal error */
void nonfatal_error_deff (void)
{
#ifdef DEBUGGER
	dmd_alloc_low_clean ();
	sprintf ("NONFATAL %ld", system_audits.non_fatal_errors);
	font_render_string_center (&font_mono5, 64, 10, sprintf_buffer);
	sprintf ("ERRNO %i GID %i", last_nonfatal_error_code, last_nonfatal_error_gid);
	font_render_string_center (&font_mono5, 64, 20, sprintf_buffer);
	dmd_show_low ();
	sound_send (SND_TEST_ALERT);
	task_sleep (TIME_200MS);
	sound_send (SND_TEST_ALERT);
	task_sleep (TIME_200MS);
	sound_send (SND_TEST_ALERT);
	task_sleep_sec (4);
#endif
	deff_exit ();
}
コード例 #25
0
ファイル: pb_lock.c プロジェクト: SonnyJim/freewpc
CALLSET_ENTRY (pb_lock, sw_left_button)
{
	if (deff_get_active () == DEFF_LOCK_POWERBALL && !timer_find_gid (GID_PB_LOCK_DEBOUNCE))
	{
		sound_send (SND_BUYIN_CANCELLED);
		lock_powerball = FALSE;
		deff_stop (DEFF_LOCK_POWERBALL);
	}
}
コード例 #26
0
ファイル: pb_lock.c プロジェクト: SonnyJim/freewpc
/* The ball should be held at this point */
CALLSET_ENTRY (pb_lock, pb_lock_choose)
{

	timer_restart_free (GID_PB_LOCK_DEBOUNCE, TIME_1S);
	sound_send (SND_PIANO_ENTRY_TUNE);
	flipper_disable ();
	deff_start_sync (DEFF_LOCK_POWERBALL);
	task_create_anon (flipper_enable_task);
}
コード例 #27
0
ファイル: music.c プロジェクト: SonnyJim/freewpc
void slow_music_log (U8 count, U8 delay)
{
    U8 i;
    for (i = 0; i < count; i++)
    {
        sound_send (SND_MUSIC_SLOWER);
        task_sleep (delay + i);
    }
}
コード例 #28
0
ファイル: rightramp.c プロジェクト: SonnyJim/freewpc
void sw_right_ramp_enter_task (void)
{
	/* Decide whether to let the ball onto the mini-playfield,
	or dump it.  Do this once for each balls that enters the
	ramp. */
	do {
		/* Let it through to the mpf field if allowed */
		if (mpf_ready_p ())
		{
			/* Reset the unlit count so we can
			 * hint to the player again later */
			unlit_right_ramps = 0;
			bridge_open_start ();
			task_sleep_sec (3);
			/* Don't close if another ball is on it's way */
			if (right_ramps_entered == 1)
				bridge_open_stop ();
		}
		else
		{
			/* Ramp was hit unlit, increment the hint counter */
			bounded_increment (unlit_right_ramps, 3);
			/* tell unlit.c that an unlit shot was made */
			award_unlit_shot (SW_RIGHT_RAMP);

			 /* Show an animation hint if not enabled for mpf */
			if ((unlit_right_ramps == 3  || hurryup_active ())
				&& !global_flag_test (GLOBAL_FLAG_MULTIBALL_RUNNING))
				deff_start (DEFF_SHOOT_HITCH);
			else if (global_flag_test (GLOBAL_FLAG_MULTIBALL_RUNNING)
					&& global_flag_test (GLOBAL_FLAG_MB_JACKPOT_LIT))
			{
				deff_start (DEFF_SHOOT_JACKPOT);
			}
			task_sleep_sec (2);
	
			/* Wait until allowed to kickout */
			/* TODO BUG? */
			while (kickout_locks > 0)
				task_sleep (TIME_100MS);
			
			/* Drop the ball back to the playfield */
			sound_send (SND_RIGHT_RAMP_EXIT);
			bridge_open_start ();
			task_sleep (TIME_300MS);
			/* Sleep a bit longer if multiball, so we knock any following
			 * balls back to the playfield */
			if (multi_ball_play ())
				task_sleep (TIME_200MS);
			bridge_open_stop ();
		}
	} while (--right_ramps_entered > 0);
	/* Failsafe */
	bridge_open_stop ();
	task_exit ();
}
コード例 #29
0
ファイル: lanes.c プロジェクト: SonnyJim/freewpc
void rollover_completed_deff (void)
{
    dmd_alloc_low_clean ();
    if (rollover_count % 4 == 0)
    {
        font_render_string_center (&font_cowboy, 64, 8, "CAMERA");
        font_render_string_center (&font_cowboy, 64, 18, "LIT");
        sound_send (SND_CAMERA_PICTURE_EJECT_2);
    }
    else
    {
        font_render_string_center (&font_quadrit, 64, 8, "ROLLOVER");
        font_render_string_center (&font_quadrit, 64, 18, "COMPLETED");
        sound_send (SND_GLASS_BREAKS);
    }
    dmd_show_low ();
    task_sleep_sec (1);
    deff_exit ();
}
コード例 #30
0
ファイル: music.c プロジェクト: SonnyJim/freewpc
void music_check_mode_timer (U8 mode_timer)
{
    if (old_mode_timer == mode_timer)
        return;
    old_mode_timer = mode_timer;
    if (mode_timer <= 10 && mode_timer > 5)
    {
        sound_send (SND_MUSIC_FASTER);
    }
}