Beispiel #1
0
CALLSET_ENTRY (outhole, serve_ball)
{
	powerball_death = FALSE;
	multidrain_count = 0;
	multidrain_awarded = FALSE;
	timer_kill_gid (GID_MULTIDRAIN);
}
Beispiel #2
0
static inline void gangway_shot (task_gid_t gid, task_gid_t other_gid)
{
	score (SC_50K);
	if (gangway_available_p ())
	{
		if (timer_find_gid (gid))
		{
			timer_kill_gid (gid);
			gangway_loop_collected ();
		}
		else
		{
			timer_kill_gid (other_gid);
			timer_start_free (gid, TIME_5S);
			gangway_loop_lit ();
		}
	}
}
Beispiel #3
0
static inline void gangway_light (task_gid_t gid, task_gid_t other_gid)
{
	if (gangway_available_p ())
	{
		timer_kill_gid (other_gid);
		timer_restart_free (gid, TIME_5S);
		gangway_loop_lit ();
	}
}
Beispiel #4
0
CALLSET_ENTRY (slot, dev_slot_enter)
{
	if (task_kill_gid (GID_CAMERA_SLOT_PROX_DETECT)
		 || task_kill_gid (GID_PIANO_SLOT_PROX_DETECT))
	{
		/* Proximity sensor did not trip ; must be the powerball */
		pb_detect_event (PF_PB_DETECTED);
		pb_announce ();
	}

	if (!in_live_game)
		return;
	else if (task_find_or_kill_gid (GID_DEADEND_TO_SLOT)
	 	|| task_find_or_kill_gid (GID_GUMBALL_TO_SLOT)
		|| task_find_or_kill_gid (GID_PIANO_TO_SLOT)
		|| task_find_or_kill_gid (GID_CAMERA_TO_SLOT))
	{
		/* dead end was recently hit, so ignore slot */
		/* piano was recently hit, so ignore slot */
		/* camera was recently hit, so ignore slot */
	}
	else if (event_did_follow (skill_shot, slot)
		|| skill_shot_enabled
		|| global_flag_test (GLOBAL_FLAG_SSSMB_RUNNING))
	{
		/* TODO, this may be buggy during sssmb */
		/* skill shot has been missed or ball landed in plunger lane*/
		if (timer_kill_gid (GID_SDSS_APPROACHING)) 
			callset_invoke (sdss_ready);
		callset_invoke (skill_missed);
	}
	else if (timed_mode_running_p (&sslot_mode))
	{
		//TODO If shot from lite slot lane, allow player to choose award
		shot_sslot ();
	}
	else if (can_award_door_panel () && flag_test (FLAG_SLOT_DOOR_LIT))
	{
		shot_slot_door ();
	}
	else 
	{
		shot_slot_oddchange ();
	}
	/* Sleep so the deffs can get a chance to start and stop it
	 * kicking out too early */
	task_sleep (TIME_400MS);
	
}
Beispiel #5
0
void sssmb_stop (void)
{
	if (!global_flag_test (GLOBAL_FLAG_SSSMB_RUNNING))
		return;	
	if (mball_jackpot_uncollected == TRUE)
		sound_send (SND_NOOOOOOOO);

	global_flag_off (GLOBAL_FLAG_SSSMB_RUNNING);
	global_flag_off (GLOBAL_FLAG_SSSMB_RED_JACKPOT);
	global_flag_off (GLOBAL_FLAG_SSSMB_ORANGE_JACKPOT);
	global_flag_off (GLOBAL_FLAG_SSSMB_YELLOW_JACKPOT);
	timer_kill_gid (GID_SSSMB_DIVERT_DEBOUNCE);
	task_kill_gid (GID_SSSMB_JACKPOT_READY);
	deff_stop (DEFF_SSSMB_RUNNING);
	lamp_tristate_off (LM_SUPER_SKILL);
	effect_update_request ();
}
Beispiel #6
0
/** Called from a switch handler to do the common processing.
 * The input is the device number.  The actual switch that
 * transitioned is unknown, as we don't really care. */
void device_sw_handler (U8 devno)
{
	/* Ignore device switches until initialization is complete */
	if (!sys_init_complete)
	{
		dbprintf ("Device switch ignored during init.\n");
		return;
	}

	/* Ignore device switches if the device update task is already running.
	 * It is polling the device count and will deal with this event. */
	if (task_find_gid (DEVICE_GID (devno)))
		return;

	timer_kill_gid (GID_DEVICE_SWITCH_WILL_FOLLOW);
	task_recreate_gid_while (DEVICE_GID (devno), device_update, TASK_DURATION_INF);
}
Beispiel #7
0
void sssmb_stop (void)
{
	callset_invoke (sssmb_stop);
	if (!global_flag_test (GLOBAL_FLAG_SSSMB_RUNNING))
		return;	
	if (mball_jackpot_uncollected == TRUE)
	{
		sound_send (SND_NOOOOOOOO);
		callset_invoke (start_hurryup);
	}

	global_flag_off (GLOBAL_FLAG_SSSMB_RUNNING);
	global_flag_off (GLOBAL_FLAG_SSSMB_RED_JACKPOT);
	global_flag_off (GLOBAL_FLAG_SSSMB_ORANGE_JACKPOT);
	global_flag_off (GLOBAL_FLAG_SSSMB_YELLOW_JACKPOT);
	timer_kill_gid (GID_SSSMB_DIVERT_DEBOUNCE);
	task_kill_gid (GID_SSSMB_JACKPOT_READY);
	deff_stop (DEFF_SSSMB_RUNNING);
	lamp_tristate_off (LM_SUPER_SKILL);
	music_refresh ();
}
Beispiel #8
0
void hitchhiker_deff (void)
{
	/* Start a timer so jets won't stop animation */
	timer_restart_free (GID_HITCHHIKER, TIME_3S);
	dmd_alloc_pair_clean ();
	U16 fno;
	for (fno = IMG_HITCHHIKER_START; fno <= IMG_HITCHHIKER_END; fno += 2)
	{
		dmd_map_overlay ();
		dmd_clean_page_low ();
			
		if (timed_mode_running_p (&hitch_mode))
		{
			sprintf("10 MILLION");
			font_render_string_center (&font_fireball, 64, 16, sprintf_buffer);
		}
		else
		{
			sprintf ("HITCHERS");
			font_render_string_center (&font_nayupixel10, 98, 5, sprintf_buffer);
			sprintf ("%d", hitch_count);
			font_render_string_center (&font_quadrit, 99, 24, sprintf_buffer);
		}	
	
		dmd_text_outline ();
		dmd_alloc_pair ();
		frame_draw (fno);
		dmd_overlay_outline ();
		dmd_show2 ();
		//task_sleep (TIME_33MS);
	}
	task_sleep  (TIME_500MS);
	/* Stop the timer so jets.c can show deffs again */
	timer_kill_gid (GID_HITCHHIKER);
	deff_exit ();
	
}