コード例 #1
0
ファイル: superjets.c プロジェクト: CardonaPinball/freewpc_DM
/****************************************************************************
 *
 * display effects
 *
 ****************************************************************************/
void superjets_effect_deff(void) {
	U8 sj_swap = 0;
	U8 TOGGLE = 0;
	dmd_alloc_pair_clean ();// Clean both pages
	for (;;) {
		dmd_map_overlay ();
		dmd_clean_page_low ();
//right side status display
		ll_score_draw_ball ();

//left side display
		sprintf_score (superjets_mode_score);
		font_render_string_right (&font_var5, 98, 25, sprintf_buffer);

		if (ballsave_test_active()) {
			sprintf ("%d BALL SAVE", ballsave_get_timer());
		}
		else {
		sprintf ("%d SEC,  %d TO GOAL", superjets_mode_timer, superjets_goal - superjets_mode_shots_made);
		}
		font_render_string_right (&font_var5, 98, 0, sprintf_buffer);
		dmd_text_outline ();
		dmd_alloc_pair ();
		sj_counter++;
		if (sj_counter % 3 == 1) 	frame_draw(IMG_SUPERJETS_1);
		if (sj_counter % 3 == 2)	frame_draw(IMG_SUPERJETS_2);
		if (sj_counter % 3 == 0) 	frame_draw(IMG_SUPERJETS_3);
		dmd_overlay_outline ();
		dmd_show2 ();
		task_sleep (TIME_500MS);
		if (++sj_swap % 4 == 0) { if (++TOGGLE > 1) TOGGLE = 0; } //change TOGGLE once xx second
		dmd_alloc_pair_clean ();// Clean both pages
	}//END OF ENDLESS LOOP
	deff_exit();
}//end of mode_effect_deff
コード例 #2
0
ファイル: wasteland.c プロジェクト: CardonaPinball/freewpc_DM
void wasteland_effect_deff (void) {
	for (;;) {
		dmd_clean_page_low ();
//right side status display
		ll_score_draw_ball ();

//left side display
		sprintf_score(current_score);
		font_render_string_center (&font_var5, 50, 13, sprintf_buffer);
		font_render_string_right (&font_halobold12, 84, 1, "WASTE");
		if (ballsave_test_active()) {
			sprintf ("%d BALL SAVE", ballsave_get_timer());
			font_render_string_center (&font_var5, 50, DMD_MED_CY_BOTTOM_LINE + 3, sprintf_buffer);
		}
		else {
			if (WL_TOGGLE == 0) 		{ sprintf ("15 MILLION"); font_render_string_right (&font_fixed6, 85, 21, sprintf_buffer); }
			else if (WL_TOGGLE == 1)	{ sprintf ("JACKPOT LIT"); font_render_string_right (&font_fixed6, 92, 21, sprintf_buffer); }
			else if (WL_TOGGLE == 2)	{
				sprintf ("%d JACKPOTS MADE", wasteland_jackpot_shots_made);
				font_render_string_right (&font_var5, 85, 19, sprintf_buffer);

				if (get_is_super_jackpot_lit()) sprintf ("SUPER LIT");
				else sprintf ("SHOOT %d ENABLE SUPER", 5 - (wasteland_jackpot_shots_made % 5) );
				font_render_string_right (&font_var5, 95, 26, sprintf_buffer);
			}
		}
		dmd_show_low ();
		task_sleep (TIME_1S);
		if (++wasteland_display_counter % 5 == 0) { if (++WL_TOGGLE > 2) WL_TOGGLE = 0; } //change WL_TOGGLE once per second
	}//END OF ENDLESS LOOP
}//end of function
コード例 #3
0
ファイル: fastlock.c プロジェクト: lolzmania/freewpc
void fastlock_mode_deff (void)
{
    for (;;)
    {
        /* Fudge loop time in ms into
         * something semi-meaningful to display */
        U8 display_loop_time;
        display_loop_time = 100;
        display_loop_time -= loop_time;
        if (display_loop_time < 1)
            display_loop_time = 1;

        dmd_alloc_low_clean ();
        font_render_string_center (&font_var5, 64, 5, "SHOOT FAST LOOPS");
        sprintf("%d MILLION", fastlock_award);
        font_render_string_center (&font_fixed6, 64, 16, sprintf_buffer);
        sprintf ("LAST LOOP WAS %dMPH", display_loop_time);
        font_render_string_center (&font_var5, 64, 27, sprintf_buffer);
        sprintf ("%d", fastlock_mode_timer);
        font_render_string (&font_var5, 2, 2, sprintf_buffer);
        font_render_string_right (&font_var5, 126, 2, sprintf_buffer);
        dmd_show_low ();
        task_sleep (TIME_200MS);
    }
}
コード例 #4
0
void prison_break_effect_deff(void) {
	U8 i = 0;
	U8 toggle = 0;
	for (;;) {
		i++;
		if (i % 5 == 0) if (++toggle >= 3) toggle = 0;//change TOGGLE once per n seconds
		dmd_alloc_pair_clean();
		//right side status display
		ll_score_draw_ball ();


		//left side display

			font_render_string_left (&font_halobold12, 1, 0, "BREAK");
			font_render_string_right (&font_halobold12, 99, 9, "OUT");

			if (ballsave_test_active()) {
				sprintf ("%d BALL SAVE", ballsave_get_timer());
			}
			else
			if (toggle == 1) 		sprintf ("%d SEC LEFT", prison_break_mode_timer);
		else if (toggle == 2)	sprintf ("%d HIT", prison_break_mode_shots_made);
		else if (toggle == 0)	sprintf ("SHOOT EVERYTHING");
		font_render_string_center (&font_var5, 50, DMD_MED_CY_BOTTOM_LINE + 3, sprintf_buffer);

		sprintf_score (prison_break_mode_score);
		font_render_string_center (&font_var5, 50, 28, sprintf_buffer);
		dmd_show_low ();
		task_sleep (TIME_1S);
	}//END OF ENDLESS LOOP
}//end of mode_effect_deff
コード例 #5
0
ファイル: slot.c プロジェクト: SonnyJim/freewpc
void sslot_mode_deff (void)
{
	U16 fno;
	dmd_alloc_pair_clean ();
	for (;;)
	{
		for (fno = IMG_REELSTRIP_START; fno <= IMG_REELSTRIP_END; fno += 2)
		{
			dmd_map_overlay ();
			dmd_clean_page_low ();
		
			font_render_string_center (&font_nayupixel10, 64, 5, "SHOOT SLOT MACHINE");
			sprintf_current_score ();
			font_render_string_center (&font_cowboy, 64, 14, sprintf_buffer);
			font_render_string_center (&font_bitcube10, 64, 25, sslot_award_names[sslot_award_index]);
			sprintf ("%d", sslot_mode_timer);
			font_render_string (&font_var5, 8, 16, sprintf_buffer);
			font_render_string_right (&font_var5, 120, 16, sprintf_buffer);
			
			dmd_text_outline ();
			dmd_alloc_pair ();
			frame_draw (fno);
			dmd_overlay_outline ();
			dmd_show2 ();
			task_sleep (TIME_66MS);
		}
	}
	deff_exit ();

}
コード例 #6
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 ();
}
コード例 #7
0
void clock_millions_mode_deff (void)
{
	//U16 fno;
	for (;;)
	{
//		for (fno = IMG_CLOCK_START; fno <= IMG_CLOCK_END; fno += 2)
//		{
			dmd_alloc_pair_clean ();
	//		dmd_map_overlay ();
	//		dmd_clean_page_low ();
	
			font_render_string_center (&font_nayupixel10, 64, 5, "CLOCK MILLIONS");
			sprintf_current_score ();
			font_render_string_center (&font_quadrit, 64, 16, sprintf_buffer);
			psprintf ("SHOOT CLOCK 1 MORE TIME", "SHOOT CLOCK %d MORE TIMES", 6 - clock_mode_hits);
			font_render_string_center (&font_var5, 64, 27, sprintf_buffer);
			sprintf ("%d", clock_millions_mode_timer);
			font_render_string (&font_var5, 2, 2, sprintf_buffer);
			font_render_string_right (&font_var5, 126, 2, sprintf_buffer);
	//		dmd_text_outline ();
		//	dmd_alloc_pair ();
			//frame_draw (fno);
			dmd_copy_low_to_high ();
			callset_invoke (score_overlay);
		//	dmd_overlay_outline ();
			dmd_show2 ();
			task_sleep (TIME_66MS);
//		}
	}
}
コード例 #8
0
ファイル: initials.c プロジェクト: Dave2084/freewpc
/**
 * The display effect for the enter initials screen.
 *
 * It continuously redraws itself whenever the timer, the selected
 * character, or the entered characters change.
 */
void enter_initials_deff (void)
{
	while (in_test || task_find_gid (GID_ENTER_INITIALS))
	{
		if (score_update_required ())
		{
#if (MACHINE_DMD == 1)
			U8 n;
			dmd_alloc_low_clean ();
			font_render_string_left (&font_var5, 0, 1, "ENTER INITIALS");
			font_render_string_left (&font_fixed10, 0, 9, initials_data);

			if (initials_selection < MAX_INITIAL_INITIAL+1)
			{
				sprintf ("%12s", initial_chars + initials_selection);
				font_render_string_left (&font_bitmap8, 0, 23, sprintf_buffer);
			}
			else
			{
				U8 x;

				x = ALPHABET_LEN - initials_selection;
				sprintf ("%*s", x, initial_chars + initials_selection);
				font_render_string_left (&font_bitmap8, 0, 23, sprintf_buffer);

				x = MAX_LETTERS_SHOWN - x;
				sprintf ("%*s", x, initial_chars);
				x = MAX_LETTERS_SHOWN - x;
				font_render_string_left (&font_bitmap8, x * FONT_WIDTH, 23, sprintf_buffer);
			}

			for (n = 22; n <= 30; n++)
			{
				dmd_low_buffer[16UL * n + SELECT_OFFSET - 1] ^= 0x80;
				dmd_low_buffer[16UL * n + SELECT_OFFSET] ^= 0x7F;
			}

			sprintf ("%d", initials_enter_timer);
			font_render_string_right (&font_fixed6, 126, 3, sprintf_buffer);
			dmd_show_low ();
#else
			seg_alloc_clean ();
			seg_write_string (0, 0, "ENTER INITIALS");
			sprintf ("%c", initial_chars[initials_selection]);
			seg_write_string (0, 15, sprintf_buffer);
			seg_write_string (1, 0, initials_data);
			sprintf ("%d", initials_enter_timer);
			seg_write_string (1, 14, sprintf_buffer);
			seg_show ();
#endif
		}
		task_sleep (TIME_66MS);
	}
	task_sleep (TIME_500MS);
	deff_exit ();
}
コード例 #9
0
ファイル: reset.c プロジェクト: CardonaPinball/freewpc_DM
/** Display effect for system reset */
void system_reset_deff (void)
{
	/* On DMD machines display the full copyright screen.  Alphanumerics
	aren't large enough to do this. */
#if (MACHINE_DMD == 1)
	dmd_alloc_low_clean ();
	font_render_string_center (&font_var5, 64, 3, "FREEWPC (C) COPYRIGHT " C_STRING(BUILD_YEAR));
	font_render_string_center (&font_var5, 64, 11, "THIS SOFTWARE IS NOT");
	font_render_string_center (&font_var5, 64, 17, "SUPPORTED BY BALLY/WILLIAMS");
	font_render_string_center (&font_var5, 64, 25, "WWW.ODDCHANGE.COM/FREEWPC");
	dmd_show_low ();
#endif
#if (MACHINE_ALPHANUMERIC == 1)
	seg_alloc_clean ();
	seg_write_row_center (0, "FREEWPC <C>" C_STRING(BUILD_YEAR));
	seg_write_row_center (1, "WWW.ODDCHANGE.COM");
	seg_show ();
#endif
	task_sleep_sec (3);
#ifdef CONFIG_DMD_OR_ALPHA
	dmd_alloc_low_clean ();
	font_render_string_left (&font_mono5, 1, 1, MACHINE_NAME);

#ifdef DEBUGGER
	sprintf ("D%s.%s", C_STRING(MACHINE_MAJOR_VERSION), C_STRING(MACHINE_MINOR_VERSION));
#else
	sprintf ("R%s.%s", C_STRING(MACHINE_MAJOR_VERSION), C_STRING(MACHINE_MINOR_VERSION));
#endif
	font_render_string_right (&font_mono5, 127, 1, sprintf_buffer);

	SECTION_VOIDCALL (__common__, render_build_date);
	font_render_string_left (&font_mono5, 1, 9, sprintf_buffer);

#if (MACHINE_PIC == 1)
	pic_render_serial_number ();
	font_render_string_left (&font_mono5, 1, 18, sprintf_buffer);
#endif

	font_render_string_left (&font_mono5, 1, 26, "TESTING...");
	dmd_show_low ();
#endif

	/* Keep the reset display for at least 3 seconds (so
	 * it is readable), keep it longer if any of the
	 * asynchronous initializations are still running. */
	task_sleep_sec (3);
	while (sys_init_pending_tasks != 0)
		task_sleep (TIME_66MS);

	/* If there were any diagnostic errors discovered, announce
	this fact. */
	diag_announce_if_errors ();

	dbprintf ("System initialized.\n");
	deff_exit ();
}
コード例 #10
0
ファイル: tz_amode.c プロジェクト: SonnyJim/freewpc
static inline void show_sonny_jim (void)
{
	amode_page_start ();
	dmd_alloc_pair_clean ();
	/* Draw a 'white' background for the transition */
	dmd_invert_page (dmd_low_buffer);
	dmd_invert_page (dmd_high_buffer);
	dmd_show2 ();
	/* sonny_jim should emerge from the bottom */
	dmd_sched_transition (&trans_scroll_up);
	dmd_alloc_pair ();
	frame_draw (IMG_SONNY_JIM);
	/* Start the transition */
	dmd_show2 ();
	/* Paint the text on */
	dmd_map_overlay ();
	dmd_clean_page_low ();
	font_render_string_right (&font_var5, 126, 7, "NOT AN ORDINARY DAY OR");
	font_render_string_right (&font_var5, 122, 18, "AN ORDINARY PLAYER");
	dmd_text_outline ();
	dmd_alloc_pair ();
	frame_draw (IMG_SONNY_JIM);
	dmd_overlay_outline ();
	dmd_show2 ();
	task_create_anon (amode_talking_task);
	amode_sleep_sec (4);
	/* Now just draw sonny_jim again */
	dmd_alloc_pair ();
	frame_draw (IMG_SONNY_JIM);
	dmd_show2 ();
	/* Exit stage right */
	dmd_sched_transition (&trans_scroll_down);
	/* Draw a 'white' background for the transition again */
	dmd_alloc_pair_clean ();
	dmd_invert_page (dmd_low_buffer);
	dmd_invert_page (dmd_high_buffer);
	dmd_show2 ();
	
	dmd_sched_transition (&trans_bitfade_slow);
}
コード例 #11
0
ファイル: fortress.c プロジェクト: CardonaPinball/freewpc_DM
void fortress_effect_deff (void) {
	for (;;) {
			dmd_clean_page_low ();
//right side status display
			ll_score_draw_ball ();

//left side display
			sprintf_score(current_score);
			font_render_string_center (&font_var5, 50, 13, sprintf_buffer);
			font_render_string_right (&font_halobold12, 100, 1, "FORTRESS");

			if (fortress_ballsave) {
				sprintf ("%d BALL SAVE", fortress_ballsave);
				font_render_string_center (&font_var5, 50, DMD_MED_CY_BOTTOM_LINE + 3, sprintf_buffer);
			}
			else
			if (fortress_display_counter % 4 != 0) { //draw for 9/10 and blank for 1/10
				if (FORT_TOGGLE == 0) 		{ sprintf ("10 MILLION"); font_render_string_right (&font_fixed6, 85, 21, sprintf_buffer); }
				else if (FORT_TOGGLE == 1)	{ sprintf ("JACKPOT LIT"); font_render_string_right (&font_fixed6, 92, 21, sprintf_buffer); }
				else if (FORT_TOGGLE == 2)	{
					sprintf ("%d JACKPOTS MADE", fortress_jackpot_shots_made);
					font_render_string_right (&font_var5, 85, 19, sprintf_buffer);

					if (get_is_super_jackpot_lit()) sprintf ("SUPER JACKPOT LIT");
					else sprintf ("SHOOT %d ENABLE SUPER", 5 - (fortress_jackpot_shots_made % 5) );
					font_render_string_right (&font_var5, 95, 26, sprintf_buffer);
				}
			} else 						  sprintf ("");
			dmd_show_low();
			task_sleep (TIME_1S);

		if (++fortress_display_counter >= 30) fortress_display_counter  = 0;
		if (fortress_display_counter % 20 == 0) {
			if (++FORT_TOGGLE > 2) FORT_TOGGLE = 0; //change FORT_TOGGLE once per
			if (DM_IN_DMD_TEST) 	score (FORTRESS_MB_SCORE);
		}
	}//END OF ENDLESS LOOP
}//end of function
コード例 #12
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 ();
}
コード例 #13
0
ファイル: huxley.c プロジェクト: CardonaPinball/freewpc_DM
void huxley_effect_deff(void) {
	for (;;) {
		dmd_clean_page_low ();
		//right side status display
		ll_score_draw_ball ();

		//left side display
				sprintf_score(current_score);
				font_render_string_right (&font_var5, 98, 26, sprintf_buffer);
				font_render_string_center (&font_halobold12, 50, 5, "HUXLEY");
				if (ballsave_test_active()) {
					sprintf ("%d BALL SAVE", ballsave_get_timer());
					font_render_string_right (&font_var5, 88, 27, sprintf_buffer);
				}
				else
					font_render_string_right (&font_term6, 98, 14, "1 MILLION");

				sprintf ("%d", huxley_mode_timer);
				font_render_string_left (&font_halobold12, 1, 14, sprintf_buffer);
				dmd_show_low();
				task_sleep (TIME_1S);
	}//END OF ENDLESS LOOP
	deff_exit ();
}//end of mode_effect_deff
コード例 #14
0
ファイル: challenge.c プロジェクト: SonnyJim/freewpc
void challenge_running_deff (void)
{
	bool flash = FALSE;
	while (in_live_game)
	{
		U8 time_minutes, time_seconds;
		time_minutes = 0;
		time_seconds = timed_game_timer;
		while (time_seconds >= 60)
		{
			time_minutes++;
			time_seconds -= 60;
		}

		dmd_alloc_low_clean ();
		font_render_string_center (&font_fixed6, 64, 7, "SHOOT");
		if (flash)
		{
			if (challenge_shot_1_active && challenge_shot_2_active)
			{
				sprintf("%s", challenge_shots[challenge_shot_1].shot_name);
				font_render_string_left (&font_var5, 8, 16, sprintf_buffer);
				sprintf("%s", challenge_shots[challenge_shot_2].shot_name);
				font_render_string_right (&font_var5, 120, 16, sprintf_buffer);
			}
			else if (challenge_shot_1_active)
			{
				sprintf("%s", challenge_shots[challenge_shot_1].shot_name);
				font_render_string_center (&font_var5, 64, 16, sprintf_buffer);
			}
			else if (challenge_shot_2_active)
			{
				sprintf("%s", challenge_shots[challenge_shot_2].shot_name);
				font_render_string_center (&font_var5, 64, 16, sprintf_buffer);
			}
			flash = FALSE;
		}
		else
		{
			flash = TRUE;
		}

		sprintf ("TIME: %d:%02d  SHOTS MADE: %d", time_minutes, time_seconds, shots_made);
		font_render_string_center (&font_var5, 64, 26, sprintf_buffer);
		dmd_show_low ();
		task_sleep (TIME_100MS);
		}
}
コード例 #15
0
ファイル: jets.c プロジェクト: hydra/freewpc
void tsm_mode_deff (void)
{
	for (;;)
	{
		dmd_alloc_low_clean ();
		font_render_string_center (&font_var5, 64, 5, "TOWN SQUARE MADNESS");
		sprintf_current_score ();
		font_render_string_center (&font_fixed6, 64, 16, sprintf_buffer);
		font_render_string_center (&font_var5, 64, 27, "JETS AT 500K");
		sprintf ("%d", tsm_mode_timer);
		font_render_string (&font_var5, 2, 2, sprintf_buffer);
		font_render_string_right (&font_var5, 126, 2, sprintf_buffer);
		dmd_show_low ();
		task_sleep (TIME_200MS);
	}
}
コード例 #16
0
ファイル: slot.c プロジェクト: CardonaPinball/freewpc
void sslot_mode_deff (void)
{
	for (;;)
	{
		dmd_alloc_low_clean ();
		font_render_string_center (&font_var5, 64, 5, "SHOOT SLOT MACHINE");
		sprintf_current_score ();
		font_render_string_center (&font_fixed6, 64, 16, sprintf_buffer);
		font_render_string_center (&font_var5, 64, 27, sslot_award_names[sslot_award_index]);
		sprintf ("%d", sslot_mode_timer);
		font_render_string (&font_var5, 2, 2, sprintf_buffer);
		font_render_string_right (&font_var5, 126, 2, sprintf_buffer);
		dmd_show_low ();
		task_sleep (TIME_200MS);
	}
}
コード例 #17
0
ファイル: powerball_test.c プロジェクト: SonnyJim/freewpc
void pb_test_draw (void)
{
	dmd_alloc_low_clean ();
	font_render_string_center (&font_mono5, 64, 0, "POWERBALL TEST");

	if (pb_location == PB_MISSING)
		sprintf ("LOST");
	else if (pb_location & PB_IN_LOCK)
		sprintf ("LOCK");
	else if (pb_location & PB_IN_TROUGH)
		sprintf ("TROUGH");
	else if (pb_location & PB_IN_GUMBALL)
		sprintf ("GUMBALL");
	else if (pb_location & PB_IN_PLAY)
		sprintf ("P.F.");
	else if (pb_location & PB_MAYBE_IN_PLAY)
		sprintf ("NOT SURE");
	else
		sprintf ("ERROR");
	font_render_string_left (&font_mono5, 0, 6, sprintf_buffer);

	if (pb_location & (PB_IN_LOCK | PB_IN_TROUGH))
	{
		sprintf ("POS. %d", pb_depth);
		font_render_string_right (&font_mono5, 127, 6, sprintf_buffer);
	}

	sprintf ("TROUGH SW. %s",
		switch_poll_logical (SW_TROUGH_PROXIMITY) ? "CLOSED" : "OPEN");
	font_render_string_left (&font_mono5, 0, 12, sprintf_buffer);

	sprintf ("SLOT SW. %s",
		switch_poll_logical (SW_SLOT_PROXIMITY) ? "CLOSED" : "OPEN");
	font_render_string_left (&font_mono5, 0, 18, sprintf_buffer);

	switch (pb_test_command)
	{
		case KICK_TROUGH: sprintf ("REL. TROUGH"); break;
		case KICK_LOCK: sprintf ("REL. LOCK"); break;
		case RELEASE_GUMBALL: sprintf ("REL. GUMBALL"); break;
		case LOAD_GUMBALL: sprintf ("LOAD GUMBALL"); break;
	}
	font_render_string_left (&font_mono5, 0, 24, sprintf_buffer);

	dmd_show_low ();
}
コード例 #18
0
ファイル: match.c プロジェクト: Dave2084/freewpc
/*
 * Draw the constant part of the match animation once.
 */
static void
match_draw_scores (void)
{
	U8 n;

#if (MACHINE_DMD == 1)
	dmd_map_overlay ();
#endif
	dmd_clean_page_low ();
	font_render_string_right (&font_fixed6, 126, 1, "MATCH");

	for (n = 0; n < num_players; n++)
	{
		sprintf ("%2b", &scores[n][BYTES_PER_SCORE-1]);
		font_render_string_left (&font_mono5, 0, 6*n, sprintf_buffer);
	}
}
コード例 #19
0
ファイル: effect.c プロジェクト: Dmilo/freewpc
/** Display effect that runs during the extra ball buyin */
void buyin_offer_deff (void)
{
	U8 prev_timer;
	extern U8 buyin_offer_timer;

#if (MACHINE_DMD == 1)
	dmd_sched_transition (&trans_bitfade_slow);
#else
	seg_sched_transition (&seg_trans_fast_center_out);
#endif
	while (buyin_offer_timer > 0)
	{
		prev_timer = buyin_offer_timer;
		dmd_alloc_low_clean ();
		dmd_draw_border (dmd_low_buffer);
		font_render_string_center (&font_term6, 64, 5, "CONTINUE GAME");
#if (MACHINE_DMD == 1)
		sprintf ("%d", buyin_offer_timer);
		font_render_string_left (&font_mono5, 4, 3, sprintf_buffer);
		font_render_string_right (&font_mono5, 123, 3, sprintf_buffer);
		if (buyin_offer_timer % 2)
		{
			font_render_string_center (&font_bitmap8, 64, 16, "INSERT COINS");
			font_render_string_center (&font_bitmap8, 64, 26, "FOR EXTRA BALL");
		}
		else
		{
			font_render_string_center (&font_bitmap8, 64, 16, "THEN PRESS");
			font_render_string_center (&font_bitmap8, 64, 26, "BUY EXTRA BALL");
		}
#else
		sprintf ("%d SECS", buyin_offer_timer);
		seg_write_row_center (1, sprintf_buffer);
#endif
		dmd_show_low ();
		while (prev_timer == buyin_offer_timer)
			task_sleep (TIME_133MS);
	}
	task_sleep (TIME_1500MS);
	deff_exit ();
}
コード例 #20
0
ファイル: hitch.c プロジェクト: CardonaPinball/freewpc
void hitch_mode_deff (void)
{
	dmd_alloc_pair_clean ();
	for (;;)
	{
		dmd_map_overlay ();
		dmd_clean_page_low ();
		font_render_string_center (&font_nayupixel10, 64, 5, "SHOOT HITCHHIKER");
		sprintf_current_score ();
		font_render_string_center (&font_antiqua, 64, 13, sprintf_buffer);
		font_render_string_center (&font_nayupixel10, 64, 27, "FOR 10M");
		sprintf ("%d", hitch_mode_timer);
		font_render_string (&font_var5, 2, 2, sprintf_buffer);
		font_render_string_right (&font_var5, 126, 2, sprintf_buffer);
		dmd_text_outline ();
		dmd_alloc_pair ();
		frame_draw (IMG_HITCHHIKER_START);
		dmd_overlay_outline ();
		dmd_show2 ();
		task_sleep (TIME_200MS);
	}
}
コード例 #21
0
ファイル: deffs2.c プロジェクト: SonnyJim/freewpc
void match_loop_deff (void)
{
	U16 fno;
	dmd_alloc_pair_clean ();
	for (;;)
	{
		for (fno = IMG_MATCH_START; fno <= IMG_MATCH_END; fno += 2)
		{
			dmd_map_overlay ();
			dmd_clean_page_low ();
			font_render_string_right (&font_fixed6, 126, 1, "MATCH");
			dmd_text_outline ();
			
			dmd_alloc_pair ();
			frame_draw (fno);
			dmd_overlay_outline ();
			dmd_show2 ();
			task_sleep (TIME_33MS);
		}
	}
	deff_exit ();
}
コード例 #22
0
ファイル: jets.c プロジェクト: SonnyJim/freewpc
void tsm_mode_deff (void)
{	
	dmd_alloc_pair_clean ();
	for (;;)
	{
		dmd_map_overlay ();
		dmd_clean_page_low ();
		font_render_string_center (&font_var5, 64, 5, "TOWN SQUARE MADNESS");
		sprintf_current_score ();
		font_render_string_center (&font_fixed6, 64, 16, sprintf_buffer);
		font_render_string_center_ytop (&font_nayupixel10, 64, 22, "JETS AT 500K");
		sprintf ("%d", tsm_mode_timer);
		font_render_string (&font_var5, 2, 2, sprintf_buffer);
		font_render_string_right (&font_var5, 126, 2, sprintf_buffer);
		dmd_text_outline ();
		dmd_alloc_pair ();
		frame_draw (IMG_CITY);
		dollar_overlay ();
		dmd_overlay_outline ();

		dmd_show2 ();
		task_sleep (TIME_66MS);
	}
}