示例#1
0
文件: deffs2.c 项目: SonnyJim/freewpc
static inline void flash_and_exit_deff2 (U8 flash_count, task_ticks_t flash_delay)
{
	dmd_alloc_pair ();
	dmd_clean_page_low ();
	font_render_string_center (&font_bitoutline, 64, 16, sprintf_buffer);
	dmd_show_low ();
	dmd_copy_low_to_high ();
	dmd_invert_page (dmd_low_buffer);
	deff_swap_low_high (flash_count, flash_delay);
	deff_exit ();
}
示例#2
0
文件: effect.c 项目: Dmilo/freewpc
void ball_save_deff (void)
{
	dmd_alloc_pair ();
	dmd_clean_page_low ();
	sprintf ("PLAYER %d", player_up);
	font_render_string_center (&font_fixed6, 64, 8, sprintf_buffer);
	dmd_copy_low_to_high ();
	font_render_string_center (&font_fixed6, 64, 22, "BALL SAVED");
	dmd_show_low ();
	deff_swap_low_high (24, TIME_100MS);
	deff_exit ();
}
示例#3
0
文件: deffs2.c 项目: SonnyJim/freewpc
void shoot_power_payoff_deff (void)
{
	dmd_alloc_pair ();
	dmd_clean_page_low ();
	font_render_string_center (&font_fireball, 64, 9, "SHOOT");
	font_render_string_center (&font_fireball, 64, 24, "POWER PAYOFF");
	dmd_show_low ();
	dmd_copy_low_to_high ();
	dmd_invert_page (dmd_low_buffer);
	deff_swap_low_high (20, TIME_100MS);
	deff_exit ();
}
示例#4
0
文件: deffs2.c 项目: SonnyJim/freewpc
void shoot_again_deff (void)
{	
	sound_send (SND_EXTRA_BALL_BALLOON);
	dmd_alloc_pair ();
	dmd_clean_page_low ();
	font_render_string_center (&font_bitoutline, 64, 10, "SHOOT AGAIN");
	sprintf ("PLAYER %d", player_up);
	font_render_string_center (&font_bitcube10, 64, 22, sprintf_buffer);
	dmd_show_low ();
	dmd_copy_low_to_high ();
	dmd_invert_page (dmd_low_buffer);
	deff_swap_low_high (30, TIME_100MS);
	deff_exit ();
}
示例#5
0
文件: tilt.c 项目: Elwoodbe/freewpc
void tilt_warning_deff (void)
{
	dmd_alloc_pair_clean ();
	if (tilt_warnings % 2)
	{
		font_render_string_center (&font_fixed10, 64, 16, "DANGER");
	}
	else
	{
		font_render_string_center (&font_fixed10, 64, 7, "DANGER");
		font_render_string_center (&font_fixed10, 64, 23, "DANGER");
	}
	deff_swap_low_high (24, TIME_66MS);
	deff_exit ();
}
示例#6
0
void pitstop_award_deff(void) {

    // must happen in the deff so it doesn't crash in test mode due to uninitialised list of items
    determine_allowable_pitstop_awards();

    U8 pitstop_award_items_remaining;
    for (pitstop_award_items_remaining = PITSTOP_AWARD_ITEMS; pitstop_award_items_remaining >= 1 ; pitstop_award_items_remaining--) {
        dbprintf("remaining items: %d\n", pitstop_award_items_remaining);
        pitstop_award_draw();
        task_sleep_sec(1);

        if (pitstop_award_items_remaining >= 3) {
            sample_start (SND_TRAFFIC_ZOOM_02, SL_4S);
            eliminate_pitstop_award();
        } else if (pitstop_award_items_remaining == 2) {
            sample_start (SND_TRAFFIC_ZOOM_05, SL_4S);
            eliminate_pitstop_award();
        } else if (pitstop_award_items_remaining == 1) {
            sample_start (SND_TRAFFIC_ZOOM_03, SL_4S);
        }
        dmd_invert_page (dmd_low_buffer);
        dmd_show_low();
        task_sleep(TIME_100MS);
    }

    // find the one remaining award

    pitstop_award = DISABLED_AWARD;
    for (pitstop_award_index = 0; pitstop_award_index < PITSTOP_AWARD_ITEMS; pitstop_award_index++) {
        if (selected_pitstop_awards[pitstop_award_index] != DISABLED_AWARD) {
            pitstop_award = selected_pitstop_awards[pitstop_award_index];
        }
    }
    dbprintf("%s\n", pitstop_award_options_titles[pitstop_award]);

    // flash the remaining award

    dmd_alloc_pair ();
    dmd_clean_page_low ();
    font_render_string_center (&font_var5, 64, 16, pitstop_award_options_titles[pitstop_award]);
    dmd_show_low ();
    dmd_copy_low_to_high ();
    dmd_invert_page (dmd_low_buffer);
    deff_swap_low_high (10, TIME_100MS);

    deff_exit (); // ball will be ejected from popper soon

}
示例#7
0
文件: effect.c 项目: Dmilo/freewpc
void plunge_ball_deff (void)
{
	dmd_alloc_pair ();
	dmd_clean_page_low ();

	sprintf ("PLAYER %d", player_up);
	font_render_string_center (&font_fixed6, 64, 9, sprintf_buffer);
	dmd_draw_border (dmd_low_buffer);
	dmd_copy_low_to_high ();
#ifdef MACHINE_LAUNCH_SWITCH
	font_render_string_center (&font_fixed6, 64, 22, "PRESS LAUNCH");
#else
	font_render_string_center (&font_fixed6, 64, 22, "PLUNGE THE BALL");
#endif
	deff_swap_low_high (13, TIME_300MS);
	deff_exit ();
}
示例#8
0
文件: effect.c 项目: Dmilo/freewpc
void credits_deff (void)
{
	credits_draw ();
	deff_swap_low_high (in_live_game ? 12 : 20, 2 * TIME_100MS);
	deff_delay_and_exit (TIME_1S);
}