Beispiel #1
0
/**
 * Draw a 2-plane, 4-color DMD frame.
 * ID identifies the first plane of the frame.  The two
 * frames have consecutive IDs.
 */
void frame_draw (U16 id)
{
	frame_draw_plane (id++);
	dmd_flip_low_high ();
	frame_draw_plane (id);
	dmd_flip_low_high ();
}
Beispiel #2
0
void mb_running_deff (void)
{
	extern U8 mb_targets_left;

target_change:
	dmd_map_overlay ();
	frame_draw (IMG_UFO);
	font_render_string_center (&font_mono5, 92, 5, "MULTIBALL");
	dmd_rough_copy (64, 2, 64, 6);
	if (mb_targets_left == 0)
		sprintf ("SUPER JACKPOT LIT");
	else if (mb_targets_left == 1)
		sprintf ("%d TARGET LEFT", mb_targets_left);
	else
		sprintf ("%d TARGETS LEFT", mb_targets_left);
	font_render_string_center (&font_var5, 88, 27, sprintf_buffer);

	U8 t = mb_targets_left;
score_change:
	for (;;)
	{
		dmd_map_overlay ();
		sprintf_current_score ();
		dmd_rough_erase (64, 11, 64, 10);
		font_render_string_center (&font_mono9, 92, 16, sprintf_buffer);
		dmd_rough_copy (64, 11, 64, 10);

		for (;;)
		{
			score_update_start ();
			dmd_map_overlay ();
			dmd_dup_mapped ();
			dmd_show2 ();
			task_sleep (TIME_200MS);
			if (score_update_required ())
				goto score_change;

			dmd_map_overlay ();
			dmd_dup_mapped ();
			dmd_rough_erase (64, 11, 64, 10);
			dmd_flip_low_high ();
			dmd_rough_erase (64, 11, 64, 10);
			dmd_flip_low_high ();
			dmd_show2 ();
			task_sleep (TIME_200MS);
			if (score_update_required ())
				goto score_change;
		}
	}
}
Beispiel #3
0
/**
 * Draw an arbitrary sized bitmap at a particular region
 * of the display.
 */
void bmp_draw (U8 x, U8 y, U16 id)
{
	struct frame_pointer *p;

	page_push (IMAGEMAP_PAGE);
	p = (struct frame_pointer *)IMAGEMAP_BASE + id;
	page_push (p->page);
	bitmap_blit (PTR(p) + 1, x, y);
	if (PTR(p)[0] & 0x1)
	{
		dmd_flip_low_high ();
		p++;
		bitmap_blit (PTR(p) + 1, x, y);
		dmd_flip_low_high ();
	}
	page_pop ();
	page_pop ();
}
Beispiel #4
0
/**
 * Generate a text blur.
 *
 * On input, provide a mono DMD page in the low-mapped buffer.  The
 *    general use case is for this page to have only fonts on it.
 *
 * On output, the high mapped buffer will contain a blurred copy.
 *
 * This function is identical to 'dmd_text_outline' without the
 * inversion.
 */
void dmd_text_blur (void)
{
	dmd_shadow ();
	dmd_flip_low_high ();
}
Beispiel #5
0
/**
 * Generate a text outline.
 *
 * On input, provide a mono DMD page in the low-mapped buffer.  The
 *    general use case is for this page to have only fonts on it.
 *
 * On output, the high mapped buffer will contain the outline mask.
 *    This page can be ANDed to blacken the pixels needed to form
 *    the outline.
 */
void dmd_text_outline (void)
{
	dmd_shadow ();
	dmd_invert_page (dmd_high_buffer);
	dmd_flip_low_high ();
}