Exemplo n.º 1
0
CALLSET_ENTRY (rivcl, lamp_update)
{
	switch (riverclass)
	{
		case 6:
			lamp_tristate_on (LM_6X_MULTI);
		case 5:
			lamp_tristate_on (LM_5X_MULTI);
		case 4:
			lamp_tristate_on (LM_4X_MULTI);
		case 3:
			lamp_tristate_on (LM_3X_MULTI);
		case 2:
			lamp_tristate_on (LM_2X_MULTI);
			break;
	}
/*	if (riverclass > 1)
		lamp_tristate_on (LM_2X_MULTI);
	if (riverclass > 2)
		lamp_tristate_on (LM_3X_MULTI);
	if (riverclass > 3)
		lamp_tristate_on (LM_4X_MULTI);
	if (riverclass > 4)
		lamp_tristate_on (LM_5X_MULTI);
	if (riverclass == 6)
		lamp_tristate_on (LM_6X_MULTI);
*/
}
CALLSET_ENTRY (lock_freeze_mbstart, start_ball) {
	multiball_light_off();//goto orbits.c to turn off light and flag
	if (NumBallsFrozen > (NumMBsDone % 4) ) {
		multiball_light_on();//goto orbits.c
		flag_on(FLAG_IS_MULTIBALL_ENABLED);
	}


	lamp_tristate_off (LM_FREEZE_1);
	lamp_tristate_off (LM_FREEZE_2);
	lamp_tristate_off (LM_FREEZE_3);
	lamp_tristate_off (LM_FREEZE_4);

	switch (NumBallsFrozen) {
		case 1:	lamp_tristate_on (LM_FREEZE_1);	break;
		case 2:
				lamp_tristate_on (LM_FREEZE_1);
				lamp_tristate_on (LM_FREEZE_2);
				break;
		case 3:
				lamp_tristate_on (LM_FREEZE_1);
				lamp_tristate_on (LM_FREEZE_2);
				lamp_tristate_on (LM_FREEZE_3);
				break;
		case 4:
				lamp_tristate_on (LM_FREEZE_1);
				lamp_tristate_on (LM_FREEZE_2);
				lamp_tristate_on (LM_FREEZE_3);
				lamp_tristate_on (LM_FREEZE_4);
		break;
	}//end of switch
}
Exemplo n.º 3
0
void dragrace_start_anim (void) {
	//ball_search_timer_reset();

	// TODO show graphic of racetrack starting grid or something suitable

	// ready
	lamp_tristate_on(LM_TREE_TOP_YELLOW);
	dmd_alloc_low_clean ();
	font_render_string_center (&font_supercar9, 64, 16, "READY");
	dmd_show_low ();
	sample_start (SND_RACE_STARTER_01, SL_500MS);
	task_sleep_sec(1);

	// set
	lamp_tristate_on(LM_TREE_BOTTOM_YELLOW);
	dmd_alloc_low_clean ();
	font_render_string_center (&font_supercar9, 64, 16, "SET");
	dmd_show_low ();
	sample_start (SND_RACE_STARTER_01, SL_500MS);
	task_sleep_sec(1);

	// go
	lamp_tristate_flash(LM_LEFT_TREE_GREEN);
	lamp_tristate_flash(LM_RIGHT_TREE_GREEN);
	dmd_alloc_low_clean ();
	font_render_string_center (&font_supercar9, 64, 16, "GO");
	dmd_show_low ();
	sample_start (SND_RACE_STARTER_02, SL_2S);
}
Exemplo n.º 4
0
CALLSET_ENTRY (magic_spell, start_player)
{
	magic_spell_reset ();
	magic_relight_ramp_init = 0;
	magic_relight_ramp_count = 0;
	lamp_tristate_on (LM_CENTER_MAGIC);
	lamp_tristate_on (LM_RIGHT_MAGIC);
}
Exemplo n.º 5
0
CALLSET_ENTRY(jet, start_ball)
{
	jets_scored = 0;
	jets_for_bonus = 10;
	jets_bonus_level = 0;
	lamp_tristate_on (LM_LEFT_JET);
	lamp_tristate_on (LM_LOWER_JET);
	lamp_tristate_on (LM_RIGHT_JET);
}
Exemplo n.º 6
0
CALLSET_ENTRY (redtgt, lamp_update)
{
	if (global_flag_test (GLOBAL_FLAG_PF_LAMPS_OFF))
		return;

	if (global_flag_test (GLOBAL_FLAG_REDTGT1))
		lamp_tristate_on (LM_3BANK_TOP);
	if (global_flag_test (GLOBAL_FLAG_REDTGT2))
		lamp_tristate_on (LM_3BANK_CENTER);
	if (global_flag_test (GLOBAL_FLAG_REDTGT3))
		lamp_tristate_on (LM_3BANK_BOTTOM);
}
Exemplo n.º 7
0
void prison_break_mode_init (void) {
	prison_break_suspend = FALSE;
			//the claw mode can expire on its own and since it is a lower priority it will not display
			//callset_invoke (end_claw_mode); // this seemed to cause occasional crashes
			clawmagnet_off ();
			global_flag_off(GLOBAL_FLAG_IS_BALL_ON_CLAW);
			flipper_enable ();
			ballsave_add_time (system_config.mode_ballsave);

	//reset counter if first time run, otherwise do not - player may restart prison_break while currently running
	if (! get_dm_mode(BREAKOUT_COMPLETED) ) {
		prison_break_mode_shots_made = 0;
		score_zero(prison_break_mode_score);
		score_zero(prison_break_mode_last_score);
	}

	sound_start (ST_SPEECH, SPCH_CRYO_PRISON_BREAKOUT, SL_4S, PRI_GAME_QUICK3);
	//flash lamp for a time
	lamp_tristate_flash(LM_CLAW_PRISON_BREAK);
	task_sleep(TIME_500MS);
	lamp_tristate_on(LM_CLAW_PRISON_BREAK);
	score_add(prison_break_mode_last_score, score_table[PRIS_BREAK_HIT_SCORE]);

	score_zero(prison_break_mode_next_score);
	if (get_dm_mode(BREAKOUT_COMPLETED)) 	{
		score(PRIS_BREAK_START_SCORE2);
		score_add(prison_break_mode_score, score_table[PRIS_BREAK_START_SCORE2]);
	}
	else {
		score(PRIS_BREAK_START_SCORE1);
		score_add(prison_break_mode_score, score_table[PRIS_BREAK_START_SCORE1]);
	}
	set_dm_mode(BREAKOUT_COMPLETED); //for next time
}//end of function
Exemplo n.º 8
0
void superjets_mode_init (void) {
		//the claw mode can expire on its own and since it is a lower priority it will not display
		//	callset_invoke (end_claw_mode); // this seemed to cause occasional crashes
			clawmagnet_off ();
			global_flag_off(GLOBAL_FLAG_IS_BALL_ON_CLAW);
			flipper_enable ();
			//reset counter if first time run, otherwise do not - player may restart acmag while currently running
	sound_start (ST_SPEECH, SPCH_SUPERJETS_ACTIVATED, SL_4S, PRI_GAME_QUICK3);
	ballsave_add_time (system_config.mode_ballsave);
	//flash lamp for a time
	lamp_tristate_flash(LM_CLAW_SUPER_JETS);
	task_sleep(TIME_500MS);
	lamp_tristate_on(LM_CLAW_SUPER_JETS);
	if (get_dm_mode(SJETS_COMPLETED)) 	{
		score_add(superjets_mode_next_score, score_table[SUPERJETS_HIT_SCORE2]);
		score_add(superjets_mode_score, score_table[SUPERJETS_START_SCORE2]);
		score(SUPERJETS_START_SCORE2);
	}
	else {
		superjets_mode_shots_made = 0;
		score_zero(superjets_mode_score);
		score_zero(superjets_mode_next_score);
		score_add(superjets_mode_next_score, score_table[SUPERJETS_HIT_SCORE1]);
		score_add(superjets_mode_score, score_table[SUPERJETS_START_SCORE1]);
		score(SUPERJETS_START_SCORE1);
	}
}//end of function
Exemplo n.º 9
0
void rules_rollover_leff (void)
{
	triac_disable (TRIAC_GI_MASK);
	for (;;)
	{
		lamp_tristate_off (LM_RIGHT_INLANE);
		lamp_tristate_on (LM_LEFT_INLANE1);
		task_sleep_sec (1);
		lamp_tristate_off (LM_LEFT_INLANE1);
		lamp_tristate_on (LM_LEFT_INLANE2);
		task_sleep_sec (1);
		lamp_tristate_off (LM_LEFT_INLANE2);
		lamp_tristate_on (LM_RIGHT_INLANE);
		task_sleep_sec (1);
	}
}
Exemplo n.º 10
0
CALLSET_ENTRY (sssmb, lamp_update)
{
	if (global_flag_test (GLOBAL_FLAG_SSSMB_RUNNING) && sssmb_ramps_to_divert > 0)
		lamp_tristate_on (LM_SUPER_SKILL);
	else if (sssmb_can_divert_to_plunger ())
		lamp_tristate_flash (LM_SUPER_SKILL);
}
Exemplo n.º 11
0
//rotate rollovers when buttons pressed
CALLSET_ENTRY (rollovers, sw_right_button, sw_upper_right_button) {
	if (valid_playfield && 	!flag_test(FLAG_VIDEO_MODE_RUNNING) ) {
			if (top_rollover_activated && lower_rollover_activated) { //left not activated
				lamp_tristate_on(LM_MIDDLE_ROLLOVER);
				lamp_tristate_off(LM_TOP_ROLLOVER);
				lamp_tristate_on(LM_LOWER_ROLLOVER);
				middle_rollover_activated = TRUE;
				top_rollover_activated = FALSE;
				lower_rollover_activated = TRUE;
				}
			else if (middle_rollover_activated && lower_rollover_activated) { //center not activated
				lamp_tristate_on(LM_MIDDLE_ROLLOVER);
				lamp_tristate_on(LM_TOP_ROLLOVER);
				lamp_tristate_off(LM_LOWER_ROLLOVER);
				middle_rollover_activated = TRUE;
				top_rollover_activated = TRUE;
				lower_rollover_activated = FALSE;
				}
			else if (middle_rollover_activated && top_rollover_activated) { //right not activated
				lamp_tristate_off(LM_MIDDLE_ROLLOVER);
				lamp_tristate_on(LM_TOP_ROLLOVER);
				lamp_tristate_on(LM_LOWER_ROLLOVER);
				middle_rollover_activated = FALSE;
				top_rollover_activated = TRUE;
				lower_rollover_activated = TRUE;
				}
			else if (middle_rollover_activated) { //center and right not activated
				lamp_tristate_off(LM_MIDDLE_ROLLOVER);
				lamp_tristate_on(LM_TOP_ROLLOVER);
				lamp_tristate_off(LM_LOWER_ROLLOVER);
				middle_rollover_activated = FALSE;
				top_rollover_activated = TRUE;
				lower_rollover_activated = FALSE;
				}
			else if (top_rollover_activated) { //left and right not activated
				lamp_tristate_off(LM_MIDDLE_ROLLOVER);
				lamp_tristate_off(LM_TOP_ROLLOVER);
				lamp_tristate_on(LM_LOWER_ROLLOVER);
				middle_rollover_activated = FALSE;
				top_rollover_activated = FALSE;
				lower_rollover_activated = TRUE;
				}
			else if (lower_rollover_activated) { //left and center not activated
				lamp_tristate_on(LM_MIDDLE_ROLLOVER);
				lamp_tristate_off(LM_TOP_ROLLOVER);
				lamp_tristate_off(LM_LOWER_ROLLOVER);
				middle_rollover_activated = TRUE;
				top_rollover_activated = FALSE;
				lower_rollover_activated = FALSE;
				}
	}//end of 	if (in_live_game)
}//end of function to rotate right
Exemplo n.º 12
0
void fortress_start(U8 num) {
	computer_light_temp_off();
	is_fortress_running = TRUE;
	task_create_gid1 (GID_FORTRESS_START_NOISE, fortress_start_sounds);
	fortress_display_counter = 0;
	FORT_TOGGLE = 0;
	fortress_ballsave  = system_config.mb_ballsave;

	mb_mode_start(&fortress_mode);
	score_add (fortress_score, score_table[FORTRESS_MB_SCORE]);
	score (FORTRESS_MB_SCORE);

	if (!in_tilt) deff_start (DEFF_FORTRESS_START_EFFECT);
	multiball_started();//reset all MB start criteria for next time
	diverter_stop();//defined in divhold2.ct

	//LIGHTS
	if (!in_tilt) {
		leff_start (LEFF_MB_START);
			lamp_tristate_flash(LM_FORTRESS_MULTIBALL);
			task_sleep (TIME_2S);
			lamp_tristate_on (LM_FORTRESS_MULTIBALL);
			lamp_tristate_off (LM_FREEZE_1);
			lamp_tristate_off (LM_FREEZE_2);
			lamp_tristate_off (LM_FREEZE_3);
			lamp_tristate_off (LM_FREEZE_4);
	}
	//SOUNDS
	if (!in_tilt) {
			U8 	fortress_SoundCounter;
			fortress_SoundCounter = random_scaled(2);//from kernal/random.c - pick number from 0 to 2
			if (fortress_SoundCounter == 0)
				sound_start (ST_SPEECH, SPCH_SOMETHING_RIGHT_PREV_LIFE, SL_4S, PRI_GAME_QUICK3);
			else
				sound_start (ST_SPEECH, SPCH_SEND_MANIAC, SL_4S, PRI_GAME_QUICK3);
			task_sleep (TIME_3S);
	}

	//serve balls
	if (!in_tilt) {
		if (num + live_balls >= 5) set_ball_count (5);
		else set_ball_count (num + live_balls);
		//task_sleep (TIME_3S);
		set_all_jackpots(); //all 6 lit

		//start the ball save timer
		task_create_gid1 (GID_FORTRESS_BALLSAVE_TIMER, fortress_ballsave_task);
		//recount the trough every 5 secs - this is to handle situations
		//where too many drains in rapid succession cause the game to lose
		//count of live balls - this only happens during MB
		callset_invoke (mb_trough_recount_timer_start);
	}
	//just in case - make sure this is running
	ball_search_monitor_start ();
	set_dm_mode2(FORTRESS_COMPLETED); //for BONUS
}//end of function
Exemplo n.º 13
0
void dragrace_winner_anim(void) {

	dragracedbprintf ("dragrace_winner_anim: start\n");
	//ball_search_timer_reset();

	// TODO sound
	// TODO animation/graphics
	lamp_tristate_on(LM_LEFT_TREE_GREEN);
	lamp_tristate_off(LM_RIGHT_TREE_GREEN);
	lamp_tristate_off(LM_LEFT_TREE_RED);
	lamp_tristate_on(LM_RIGHT_TREE_RED);

	dmd_alloc_low_clean ();
	font_render_string_center (&font_supercar9, 64, 16, "WINNER");
	dmd_show_low ();

	task_sleep_sec(3);
	dragracedbprintf ("dragrace_winner_anim: exit\n");
}
Exemplo n.º 14
0
void wasteland_start(U8 num) {
//	kill_combos();
	computer_light_temp_off();
	task_create_gid1 (GID_WASTELAND_START_NOISE, wasteland_start_sounds);
	is_wasteland_running = TRUE;
	mb_mode_start(&wasteland_mode);

	score_add (wasteland_score, score_table[WASTELAND_MB_SCORE]);
	score (WASTELAND_MB_SCORE);

	wasteland_display_counter = 0;
	WL_TOGGLE = 0;
	wasteland_ballsave = TRUE;

	multiball_started();//reset all MB start criteria for next time
	deff_start (DEFF_WASTELAND_START_EFFECT);
	diverter_stop();//defined in divhold2.ct

	//LIGHTS
	leff_start (LEFF_MB_START);
			lamp_tristate_flash(LM_WASTELAND_MULTIBALL);
			task_sleep (TIME_2S);
			lamp_tristate_on (LM_WASTELAND_MULTIBALL);
			lamp_tristate_off (LM_FREEZE_1);
			lamp_tristate_off (LM_FREEZE_2);
			lamp_tristate_off (LM_FREEZE_3);
			lamp_tristate_off (LM_FREEZE_4);

	//SOUNDS
			U8 	wasteland_SoundCounter;
			wasteland_SoundCounter = random_scaled(2);//from kernal/random.c - pick number from 0 to 2
			if (wasteland_SoundCounter == 0)
				sound_start (ST_SPEECH, SPCH_IN_THIS_CENTURY, SL_4S, PRI_GAME_QUICK2);
			else
				sound_start (ST_SPEECH, SPCH_FEEL_GOOD_TOO, SL_4S, PRI_GAME_QUICK2);
	task_sleep (TIME_3S);
	wasteland_start_music = FALSE; //for to kill the music

	//serve balls
	if (num + live_balls >= 5) set_ball_count (5);
	else set_ball_count (num + live_balls);
	task_create_gid1 (GID_WASTELAND_BALL_SAVE, wasteland_ballsave_task);

	//task_sleep (TIME_3S);

	set_all_jackpots(); //all 6 lit
	//recount the trough every 5 secs - this is to handle situations
	//where too many drains in rapid succession cause the game to lose
	//count of live balls - this only happens during MB
	callset_invoke (mb_trough_recount_timer_start);

	//just in case - make sure this is running
	ball_search_monitor_start ();
	set_dm_mode2(WASTELAND_COMPLETED); //for BONUS
}//end of function
Exemplo n.º 15
0
void badge_award (U8 lamp)
{
	if (!finale_is_running () && !finale_qualified ())
	{
		lamp_tristate_on (lamp);
		if (lamplist_test_all (LAMPLIST_MODES, lamp_test))
		{
			badges_complete ();
		}
	}
}
Exemplo n.º 16
0
/****************************************************************************
 * initialize  and exit
 ***************************************************************************/
void rollover_reset (void) {
	rollover_SoundCounter = 0;
	rollover_MessageCounter = 0;
	middle_rollover_activated = TRUE;
	top_rollover_activated = FALSE;
	lower_rollover_activated = FALSE;
	rollover_bonus_multiplier = 1;

	lamp_tristate_on(LM_MIDDLE_ROLLOVER);
	lamp_tristate_off(LM_TOP_ROLLOVER);
	lamp_tristate_off(LM_LOWER_ROLLOVER);
}//end of rollover_reset
Exemplo n.º 17
0
void midnight_mb_update_lamps (void)
{
	if (midnight_mb_trunk_count == 0)
	{
		lamp_tristate_flash (LM_TRUNK_1);
		lamp_tristate_off (LM_TRUNK_2);
		lamp_tristate_off (LM_TRUNK_3);
	}
	else if (midnight_mb_trunk_count == 1)
	{
		lamp_tristate_on (LM_TRUNK_1);
		lamp_tristate_flash (LM_TRUNK_2);
		lamp_tristate_off (LM_TRUNK_3);
	}
	else if (midnight_mb_trunk_count == 2)
	{
		lamp_tristate_on (LM_TRUNK_1);
		lamp_tristate_on (LM_TRUNK_2);
		lamp_tristate_flash (LM_TRUNK_3);
	}
	else if (midnight_mb_trunk_count == 3)
	{
		lamp_tristate_on (LM_TRUNK_1);
		lamp_tristate_on (LM_TRUNK_2);
		lamp_tristate_on (LM_TRUNK_3);
	}
}
Exemplo n.º 18
0
void trick_update_lamp (U8 n)
{
	const struct trick_info *trinfo = trick_info_table + n;
	U8 bit = TR_BIT(n);

	/* For each shot, there are two lamps updated: the
	'mode' lamp in the 4x2 grid at the bottom, and the
	'shot' lamp which is near the shot itself. */

	/* Logic for the shot lamp:
		1. If skill shot is active, then all remaining skill shots will
			be flashing.  Other lamps will be off.
		2. Else, during Trick Multiball, these lamps continuously flash
			for Jackpots.
		3. Else, during normal play when Tricks are available, they show
			which shots have been made this ball.
		4. Else, if Tricks are not available, then they will all be off. */
	if (trick_shots_this_ball & bit)
		lamp_tristate_on (trinfo->shot_lamp);
	else
		lamp_tristate_flash (trinfo->shot_lamp);

	/* Logic for the mode shots:
		(Skill shot has no effect on these.)
		1. If Trick MB running, shots which have not been collected will
			flash, others will be lit.
		2. Else, they show status towards next Trick MB:
			- If a shot has been finished this ball, it flashes
			- If finished earlier, it is solid
			- Else, it is off.
			This state is drawn even when Tricks are not available.
		*/
	if (tricks_finished_this_ball & bit)
		lamp_tristate_flash (trinfo->mode_lamp);
	else if (tricks_finished & bit)
		lamp_tristate_on (trinfo->mode_lamp);
	else
		lamp_tristate_off (trinfo->mode_lamp);
}
Exemplo n.º 19
0
Arquivo: coin.c Projeto: hydra/freewpc
/** Update the start button lamp.  It will flash when a new game
 * can be started, or be solid on during a game.   It will be
 * off only when there are no credits. */
void lamp_start_update (void)
{
#ifdef MACHINE_START_LAMP
	if (has_credits_p ())
	{
		if (!in_game)
			lamp_tristate_flash (MACHINE_START_LAMP);
		else
			lamp_tristate_on (MACHINE_START_LAMP);
	}
	else
		lamp_tristate_off (MACHINE_START_LAMP);
#endif
}
Exemplo n.º 20
0
void freekick_lamp_update (void)
{
	if (free_kick_multiplier > 1)
	{
		lamp_tristate_flash (LM_FREE_KICK);
	}
	else if (free_kick_multiplier == 1)
	{
		lamp_tristate_on (LM_FREE_KICK);
	}
	else
	{
		lamp_tristate_off (LM_FREE_KICK);
	}
}
Exemplo n.º 21
0
CALLSET_ENTRY (hocus_pocus, lamp_update)
{
	if (hocus_pocus_can_be_started ())
	{
		lamp_tristate_on (LM_HOCUS_POCUS);
	}
	else if (hocus_pocus_goal - hocus_pocus_count == 1)
	{
		lamp_tristate_flash (LM_HOCUS_POCUS);
	}
	else
	{
		lamp_tristate_off (LM_HOCUS_POCUS);
	}
}
Exemplo n.º 22
0
Arquivo: loop.c Projeto: hydra/freewpc
void light_right_loop_lamps (void)
{
	/* Turn off all lamps */
	lamplist_apply (LAMPLIST_RIGHT_LOOPS, lamp_off);
	
	/* Light up previous lamps and flash the current level */
	U8 i;
	for (i = 0; i < right_loop_level; i++)
	{
		lamp_tristate_on (right_loop_lamps[i]);
	}
	//lamp_tristate_flash (right_loop_lamps[right_loop_level]);
	
	/* Store right_loop_level */
	last_right_loop_level = right_loop_level;
}
Exemplo n.º 23
0
//note that switch called right rollover corresponds to light called lower rollover
CALLSET_ENTRY (rollovers, sw_right_rollover) {
	if (lower_rollover_activated) {
		rollover_sounds_already_lit();
		score (ROLLOVERS_SCORE1);
		}
	else { //activate rollover
		lamp_tristate_flash(LM_LOWER_ROLLOVER);
		task_sleep (TIME_500MS);
		lamp_tristate_on(LM_LOWER_ROLLOVER);
		lower_rollover_activated = TRUE;
		score (ROLLOVERS_SCORE2);
		//check to see if this is the third rollover to activate
		if (middle_rollover_activated && top_rollover_activated)  all_rollover_made();
		else 	deff_start (DEFF_ROLLOVERS_EFFECT);
	}//end of else - not already lit, so activate rollover
}//end of function rollovers_sw_lower_rollover
Exemplo n.º 24
0
void gangway_loop_collected (void)
{
	if (gangway_count == 5 && !gangway_eb_lit_this_ball)
	{
		gangway_eb_lit_this_ball = TRUE;
		light_hard_extra_ball ();
		deff_start (DEFF_GANGWAY_EB_LIT);
	}
	else
	{
		sample_start (SND_WHEEEE, SL_1S);
		lamp_tristate_on (lamplist_index (LAMPLIST_GANGWAYS, gangway_count));
		generic_ladder_score_and_advance (&gangway_score_rule);
		deff_start (DEFF_GANGWAY_COLLECT);
		lamp_tristate_flash (lamplist_index (LAMPLIST_GANGWAYS, gangway_count));
	}
}
Exemplo n.º 25
0
void cryoprison_start(U8 num) {
	kill_combos();
//	cryoprison_start_music = TRUE; //for to play the helicopter instead of the music
	task_create_gid1 (GID_CRYOPRISON_START_NOISE, cryoprison_start_sounds);
	flag_on(FLAG_IS_CRYOPRISON_MB_RUNNING);
	cryoprison_display_counter = 0;
	CRYO_TOGGLE = 0;
	snake_pos = 0;
	cryoprison_ballsave = TRUE;
	mb_mode_start(&cryoprison_mode);
	multiball_started();//reset all MB start criteria for next time

	score_add (cryoprison_score, score_table[CRYOPRISON_MB_SCORE]);
	score (CRYOPRISON_MB_SCORE);

	deff_start (DEFF_CRYOPRISON_START_EFFECT);
	diverter_stop();//defined in divhold2.ct
	task_kill_gid (GID_CR_LIGHTS);

	//LIGHTS
			lamp_tristate_flash(LM_CRYOPRISON_MULTIBALL);
			task_sleep (TIME_2S);
			lamp_tristate_on (LM_CRYOPRISON_MULTIBALL);
			lamp_tristate_off (LM_FREEZE_1);
			lamp_tristate_off (LM_FREEZE_2);
			lamp_tristate_off (LM_FREEZE_3);
			lamp_tristate_off (LM_FREEZE_4);

	//SOUNDS
			U8 	cryoprison_SoundCounter;
			cryoprison_SoundCounter = random_scaled(2);//from kernal/random.c - pick number from 0 to 2
			if (cryoprison_SoundCounter == 0)
				sound_start (ST_SPEECH, SPCH_SIMON_SAYS_SLY, SL_4S, PRI_GAME_QUICK5);
			else
				sound_start (ST_SPEECH, SPCH_PHOENIX_SHORT, SL_4S, PRI_GAME_QUICK5);
	task_sleep (TIME_3S);
	sound_start (ST_SPEECH, SPCH_SIMON_SAYS, SL_4S, PRI_GAME_QUICK5);
	cryoprison_start_music = FALSE; //for to kill the music

	//serve balls
	set_ball_count (5);
	task_create_gid1 (GID_CRYOPRISON_BALL_SAVE, cryoprison_ballsave_task);

	task_sleep (TIME_3S);
	set_all_jackpots(); //all 6 lit
}//end of function
Exemplo n.º 26
0
Arquivo: loop.c Projeto: hydra/freewpc
void light_left_loop_lamps (void)
{
	/* Don't bother doing anything if nothing has changed */
	if (last_left_loop_level == left_loop_level)
		return;

	/* Turn off all lamps */
	lamplist_apply (LAMPLIST_LEFT_LOOPS, lamp_off);
	
	/* Light up previous lamps and flash the current level */
	U8 i;
	for (i = 0; i < left_loop_level; i++)
	{
		lamp_tristate_on (left_loop_lamps[i]);
	}
	//lamp_tristate_flash (left_loop_lamps[left_loop_level]);
	
	/* Store left_loop_level */
	last_left_loop_level = left_loop_level;
}
Exemplo n.º 27
0
void jets_active_task (void)
{
	while (timed_mode_running_p (&tsm_mode))
	{
		lamp_tristate_off (LM_RIGHT_JET);
		lamp_tristate_on (LM_LEFT_JET);
		task_sleep (TIME_100MS);	
		lamp_tristate_off (LM_LEFT_JET);
		lamp_tristate_on (LM_LOWER_JET);
		task_sleep (TIME_100MS);	
		lamp_tristate_off (LM_LOWER_JET);
		lamp_tristate_on (LM_RIGHT_JET);
		task_sleep (TIME_100MS);	
	}
	lamp_tristate_on (LM_LEFT_JET);
	lamp_tristate_on (LM_LOWER_JET);
	lamp_tristate_on (LM_RIGHT_JET);
	task_exit ();
}
Exemplo n.º 28
0
void increment_freeze(void) {
	sound_start (ST_EFFECT, LOCK_FREEZE_PLOINK, SL_1S, PRI_GAME_QUICK1);
	if (NumBallsFrozen < 5)
			switch (++NumBallsFrozen) {
			case 1:
					lamp_tristate_flash(LM_FREEZE_1);
					task_sleep (TIME_500MS);
					lamp_tristate_on (LM_FREEZE_1);
					break;
			case 2:
					lamp_tristate_flash(LM_FREEZE_2);
					task_sleep (TIME_500MS);
					lamp_tristate_on (LM_FREEZE_1);
					lamp_tristate_on (LM_FREEZE_2);
					break;
			case 3:
					lamp_tristate_flash(LM_FREEZE_3);
					task_sleep (TIME_500MS);
					lamp_tristate_on (LM_FREEZE_1);
					lamp_tristate_on (LM_FREEZE_2);
					lamp_tristate_on (LM_FREEZE_3);
					break;
			case 4:
					lamp_tristate_flash(LM_FREEZE_4);
					task_sleep (TIME_500MS);
					lamp_tristate_on (LM_FREEZE_1);
					lamp_tristate_on (LM_FREEZE_2);
					lamp_tristate_on (LM_FREEZE_3);
					lamp_tristate_on (LM_FREEZE_4);
					break;
			case 5://THERE ARE ONLY 4 LIGHTS, this is just here of for the case of maximize freezes, to prevent any from flashing
					lamp_tristate_on (LM_FREEZE_1);
					lamp_tristate_on (LM_FREEZE_2);
					lamp_tristate_on (LM_FREEZE_3);
					lamp_tristate_on (LM_FREEZE_4);
					break;
			}//end of switch
	deactivate_left_ramp_quickfreeze();//goto ramps.c
	light_quick_freeze_light_off();//goto inlanes.c
	if (	!get_back_in_the_fridge_running()
		&&	!get_back_in_the_fridge_ending() ) check_multiball_requirements();
}//end of function
Exemplo n.º 29
0
/****************************************************************************
 * initialize  and exit
 ***************************************************************************/
CALLSET_ENTRY (superjets, start_ball) 		{
	if (get_dm_mode(SJETS_COMPLETED)) 		lamp_tristate_on (LM_CLAW_SUPER_JETS);
	else 									lamp_tristate_off (LM_CLAW_SUPER_JETS);
}//end of function
Exemplo n.º 30
0
/****************************************************************************
 * initialize  and exit
 ***************************************************************************/
void prison_break_reset (void) {
	if (get_dm_mode(BREAKOUT_COMPLETED)) 	lamp_tristate_on (LM_CLAW_PRISON_BREAK);
	else 									lamp_tristate_off (LM_CLAW_PRISON_BREAK);
}//end of function