Exemplo n.º 1
0
/** Starts the thread for the currently running display effect. */
static void deff_start_task (const deff_t *deff)
{
	task_pid_t tp;

	deff_debug ("deff_start_task\n");

	/* Stop whatever deff is running now */
	task_kill_gid (GID_DEFF);
	deff_stop_task ();

	/* If this deff pauses kickouts, handle that now */
	if (deff->flags & D_PAUSE)
		kickout_lock (KLOCK_DEFF);

	/* If this deff wants to show the last score, hold
	 * on to that value */
	if (deff->flags & D_SCORE)
		score_deff_set ();

	/* Create a task for the new deff */
	tp = task_create_gid (GID_DEFF, deff->fn);
	if (tp)
	{
		if (deff->page != 0xFF)
			task_set_rom_page (tp, deff->page);
		task_set_duration (tp, TASK_DURATION_INF);
	}
}
Exemplo n.º 2
0
Arquivo: leff.c Projeto: Dmilo/freewpc
/**
 * Create a task to run the lamp effect.
 */
static void leff_create_task (const leff_t *leff, task_gid_t gid)
{
	task_pid_t tp = task_create_gid1 (gid, leff->fn);
	if (leff->page != 0)
		task_set_rom_page (tp, leff->page);
}