Ejemplo n.º 1
0
/****************************************************************************
 *
 * DMD display and sound effects
 *
 ****************************************************************************/
void cryoprison_super_jackpot_deff (void) {
	U8 i;

	for (i = 0; i < 8; i++) {
		switch (i) {
				case 0: sound_start (ST_SPEECH, SPCH_AHHHGGG, SL_2S, PRI_GAME_QUICK5); break;
				case 4: sound_start (ST_SPEECH, SPCH_HURRY_UP, SL_2S, PRI_GAME_QUICK5); break;
				case 8: sound_start (ST_SPEECH, SPCH_CLOSE_ENOUGH, SL_2S, PRI_GAME_QUICK5); break;
				case 1:
				case 3:
				case 5:
				case 7: sound_start (ST_ANY, EXPLOSION1_SHORT, SL_2S, PRI_GAME_QUICK5);
			}//END OF SWITCH
			dmd_sched_transition (&trans_scroll_up);
		dmd_alloc_low_clean ();
		font_render_string_center (&font_fireball, 64, 8, "SUPER");
		font_render_string_center (&font_fireball, 64, 24, "JACKPOT");
		dmd_show_low ();
	}//end of loop
	sample_start (MACHINE14_LONG, SL_1S);
	task_sleep (TIME_500MS);

	speech_start (SPCH_SUPER_JACKPOT, SL_1S);
	task_sleep_sec (1);
	deff_exit ();
}//end of function
Ejemplo n.º 2
0
void vm_effect_deff(void) {
	U16 fno;
	sound_start (ST_EFFECT, SUBWAY2, SL_2S, SP_NORMAL);
	for (fno = IMG_COMBO1_START; fno <= IMG_COMBO1_END; fno += 2) {
				dmd_alloc_pair ();
				frame_draw(fno);
				dmd_show2 ();
				task_sleep (TIME_100MS);
	}//end of for loop
	sound_start (ST_EFFECT, SUBWAY2, SL_2S, SP_NORMAL);

	dmd_map_overlay ();
			dmd_clean_page_low ();
			font_render_string_center (&font_term6, DMD_MIDDLE_X - 20, DMD_MED_CY_2 + 6, "VIDEO MODE");
			font_render_string_center (&font_term6, DMD_MIDDLE_X + 45, DMD_MED_CY_3, "READY");

			sprintf ("%d", combo_counter);
			font_render_string_center (&font_fixed10, DMD_MIDDLE_X - 15, DMD_MED_CY_1 + 4, sprintf_buffer);

			dmd_text_outline ();
				dmd_alloc_pair ();
				frame_draw(IMG_COMBO1_END);
				dmd_overlay_outline ();
				dmd_show2 ();
				task_sleep_sec (2);
	deff_exit ();
}//end of deff
Ejemplo n.º 3
0
CALLSET_ENTRY (superjets, sw_jet) {
	if (in_game && !in_tilt && timed_mode_running_p(&superjets_mode) ) {
			++superjets_mode_shots_made;

			leff_start (LEFF_FLASH_UR_GI);

			//score higher if mode done more than once
			if (get_dm_mode(SJETS_COMPLETED)) 	{
				score (SUPERJETS_HIT_SCORE2);
				score_add (superjets_mode_score, score_table[SUPERJETS_HIT_SCORE2]);
			}
			else {
				score (SUPERJETS_HIT_SCORE1);
				score_add (superjets_mode_score, score_table[SUPERJETS_HIT_SCORE1]);
			}
			if (superjets_mode_shots_made >= superjets_goal) 	superjets_goal_award();
			else {
				U8 superjets_SoundCounter;
				superjets_SoundCounter = random_scaled(3);//from kernal/random.c - pick number from 0 to 2
				if ( (superjets_SoundCounter) == 0 ) 		sound_start (ST_SPEECH, SPCH_DULCH, SL_2S, PRI_GAME_QUICK2);
				else if ( (superjets_SoundCounter) == 1 ) 	sound_start (ST_SPEECH, SPCH_WOOH, SL_2S, PRI_GAME_QUICK2);
				else 										sound_start (ST_SPEECH, SPCH_WOW, SL_2S, PRI_GAME_QUICK2);
			}
		}//end of if
}//end of function
Ejemplo n.º 4
0
void extraball_reminder_task (void) {
	for (;;) {
		if ( (extraball_SoundCounter++ % 2) == 0 ) 	sound_start (ST_SPEECH, SPCH_GET_THE_EXTRABALL, SL_4S, PRI_GAME_QUICK5);
		else										sound_start (ST_SPEECH, SPCH_NEED_EXTRABALL, SL_4S, PRI_GAME_QUICK5);
		task_sleep_sec(14);
	}//end of loop
	task_exit();
}//end of function
Ejemplo n.º 5
0
void car_chase_hit_effect_deff(void) {
	U8 car_chase_SoundCounter;
	car_chase_SoundCounter = random_scaled(car_chase_TotalNumOfSounds);//from kernal/random.c
	dmd_clean_page_high ();//
	dmd_clean_page_low ();//

	//NOTE: skid sound is played on ramp enter at ramps.c
	//these sounds are on ramp exit
	sound_start (ST_SPEECH, car_chase_SoundsArray[car_chase_SoundCounter], SL_4S, PRI_GAME_QUICK2);
	sound_start (ST_EFFECT, CAR_GEAR_CHANGE, SL_2S, PRI_GAME_QUICK2);

	if (IN_TEST) {	if (++carchase_MessageCounter > 8) carchase_MessageCounter = 0; }
	else			carchase_MessageCounter = random_scaled(9);


	switch (carchase_MessageCounter) {
		default:
		case 0:
			car_chase_animation_display_effect (IMG_CARCHASE_B_START, IMG_CARCHASE_B_END);
			car_chase_animation_display_effect (IMG_CARCHASE_A_START, IMG_CARCHASE_A_END);
			break;
		case 1:
			car_chase_animation_display_effect (IMG_CARCHASE_C_START, IMG_CARCHASE_C_END);
			car_chase_animation_display_effect (IMG_CARCHASE_B_START, IMG_CARCHASE_B_END);
			break;
		case 2:
			car_chase_animation_display_effect (IMG_CARCHASE_D_START, IMG_CARCHASE_D_END);
			car_chase_animation_display_effect (IMG_CARCHASE_C_START, IMG_CARCHASE_C_END);
			break;
		case 3:
			car_chase_animation_display_effect (IMG_CARCHASE_H_START, IMG_CARCHASE_H_END);
			car_chase_animation_display_effect (IMG_CARCHASE_D_START, IMG_CARCHASE_D_END);
			break;
		case 4:
			car_chase_animation_display_effect (IMG_CARCHASE_F1_START, IMG_CARCHASE_F1_END);
			car_chase_animation_display_effect (IMG_CARCHASE_E_START, IMG_CARCHASE_E_END);
			break;
		case 5:
			car_chase_animation_display_effect (IMG_CARCHASE_F2_START, IMG_CARCHASE_F2_END);
			car_chase_animation_display_effect (IMG_CARCHASE_H_START, IMG_CARCHASE_H_END);
			break;
		case 6:
			car_chase_animation_display_effect (IMG_CARCHASE_F2_START, IMG_CARCHASE_F2_END);
			car_chase_animation_display_effect (IMG_CARCHASE_F1_START, IMG_CARCHASE_F1_END);
			break;
		case 7:
			car_chase_animation_display_effect (IMG_CARCHASE_A_START, IMG_CARCHASE_A_END);
			car_chase_animation_display_effect (IMG_CARCHASE_J_START, IMG_CARCHASE_J_END);
			break;
		case 8:
			car_chase_animation_display_effect (IMG_CARCHASE_J_START, IMG_CARCHASE_J_END);
			car_chase_animation_display_effect (IMG_CARCHASE_E_START, IMG_CARCHASE_E_END);
			break;
		}//end of switch
	task_sleep (TIME_100MS);
	deff_exit ();
}//end of function
Ejemplo n.º 6
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
Ejemplo n.º 7
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
Ejemplo n.º 8
0
CALLSET_ENTRY (kickback, sw_right_standup)
{
	if (lamp_flash_test (LM_LITE_KICKBACK)) {
		lamp_flash_off(LM_LITE_KICKBACK);
		lamp_flash_off(LM_RIGHT_STANDUP_ARROW);
		sound_start (ST_SAMPLE, SND_BLASTER, SL_1S, PRI_GAME_QUICK3);
		kickback_enable ();
	} else {
		sound_start (ST_SAMPLE, SND_BOING, SL_1S, PRI_GAME_QUICK3);
	}
}
Ejemplo n.º 9
0
/****************************************************************************
 *
 * DMD display and sound effects
 *
 ****************************************************************************/
void fortress_super_jackpot_deff (void) {
			switch (random_scaled(3)) {
				case 0: sound_start (ST_SPEECH, SPCH_AHHHGGG, SL_2S, PRI_GAME_QUICK5); break;
				case 1: sound_start (ST_SPEECH, SPCH_HURRY_UP, SL_2S, PRI_GAME_QUICK5); break;
				case 2: sound_start (ST_SPEECH, SPCH_CLOSE_ENOUGH, SL_2S, PRI_GAME_QUICK5); break;
			}
			dmd_alloc_low_clean ();
			fortress_animation_display_effect (IMG_SJACKPOT_START, IMG_SJACKPOT_END);
			speech_start (SPCH_SUPER_JACKPOT, SL_1S);
	task_sleep (TIME_500MS);
	deff_exit ();
}//end of function
Ejemplo n.º 10
0
/****************************************************************************
 *
 * display effects
 *
 ****************************************************************************/
void extra_ball_effect_deff(void) {
	U8 eb_rnd_sound;
	U16 fno;
	dmd_alloc_pair_clean ();// Clean both pages

	if (system_config.swear_sounds == YES) {
		//this doubles the chance that a swear would occur
		eb_rnd_sound = random_scaled(5);
		if (eb_rnd_sound == 4) eb_rnd_sound = 3;
	}
	else if (system_config.extra_sounds == YES) 	eb_rnd_sound = random_scaled(3);
	else 											eb_rnd_sound = random_scaled(2);

	sound_start (ST_EFFECT, EXTRA_BALL_SOUND, SL_2S, SP_NORMAL);

	for (fno = IMG_FREEZER1_START; fno <= IMG_FREEZER1_END; fno += 2) {
				dmd_alloc_pair ();
				frame_draw(fno);
				dmd_show2 ();
				task_sleep (TIME_66MS);
	}//end of for loop

	for (fno = IMG_FREEZER2_START; fno <= IMG_FREEZER2_END; fno += 2) {
				dmd_alloc_pair ();
				frame_draw(fno);
				dmd_show2 ();
				task_sleep (TIME_66MS);
	}//end of for loop

	switch (eb_rnd_sound) {
		case 0: 	sound_start (ST_SPEECH, SPCH_EXTRABALL_WES, SL_4S, 3); break;
		case 1: 	sound_start (ST_SPEECH, SPCH_EXTRABALL_SLY, SL_4S, PRI_GAME_QUICK3); break;
		case 2: 	sound_start (ST_SPEECH, SPCH_LOVE_THOSE_EXTRA_BALLS_GIRL, SL_4S, PRI_GAME_QUICK3); break;
		case 3: 	sound_start (ST_SPEECH, SPCH_VLGR_REALLY_LICKED_AS_SNDRA, SL_4S, PRI_GAME_QUICK3); break;
}//end of switch

	for (fno = IMG_FREEZER3_START; fno <= IMG_FREEZER3_END; fno += 2) {
					dmd_map_overlay ();
					dmd_clean_page_low ();
						font_render_string_center (&font_halobold12, DMD_MIDDLE_X - 15, DMD_BIG_CY_Top, "EXTRA");
						font_render_string_center (&font_halobold12, DMD_MIDDLE_X - 15, DMD_BIG_CY_Bot, "BALL");
						dmd_text_outline ();
						dmd_alloc_pair ();
						frame_draw(fno);
						dmd_overlay_outline ();
						dmd_show2 ();
						task_sleep (TIME_66MS);
			}//end of for loop

	deff_exit ();
}//end of mode_effect_deff
Ejemplo n.º 11
0
void error(void){
    set_all_leds(POWER,0,0);
    sound_start(4);
    delay(100);
    sound_stop();
    set_all_leds(0,0,0);
    delay(50);
    set_all_leds(POWER,0,0);
    sound_start(4);
    delay(100);
    sound_stop();
    set_all_leds(0,0,0); 
    delay(10);
}
Ejemplo n.º 12
0
int	xmame_sound_start( void )
{
  xmame_func_set(0);

  if( use_sound ){ sound_enabled = TRUE;  sound_stream = TRUE; }
  else           { sound_enabled = FALSE; sound_stream = FALSE;  return 1; }


  if(verbose_proc) printf("Starting sound server: .....");

  if( sound_start()==0 ){

    sound_enabled = TRUE;
    xmame_func_set(sound_enabled);
    sound_reset();
    osd_sound_enable(1);

  }else{

    sound_enabled = FALSE;
    xmame_func_set(sound_enabled);

  }

  if(verbose_proc)
    printf("%s\n", (sound_enabled) ? "...OK" : "...FAILED, Can't use sound");

  return 1;
}
Ejemplo n.º 13
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
Ejemplo n.º 14
0
/****************************************************************************
 *
 * lighting effects
 *
 ****************************************************************************/
void top_popper_leff (void) {
	U8 i;

	for (i = 0; i < 6; i++) {
		flasher_pulse (FLASH_DIVERTER_FLASHER);
		task_sleep (TIME_33MS);
		flasher_pulse(FLASH_CLAW_FLASHER);
		task_sleep (TIME_33MS);
		flasher_pulse(FLASH_ELEVATOR_1_FLASHER);
		task_sleep (TIME_33MS);
		flasher_pulse(FLASH_ELEVATOR_2_FLASHER);
		task_sleep (TIME_100MS);
	}

	for (i = 0; i < 6; i++) {
		flasher_pulse (FLASH_LEFT_RAMP_UP_FLASHER);
		task_sleep (TIME_33MS);
		flasher_pulse (FLASH_DIVERTER_FLASHER);
		task_sleep (TIME_33MS);
		flasher_pulse (FLASH_RIGHT_RAMP_UP_FLASHER);
		sound_start (ST_EFFECT, ZAPP_3_MED, SL_2S, PRI_GAME_QUICK2);
		task_sleep (TIME_100MS);
	}
	leff_exit();
}//end of function
Ejemplo n.º 15
0
void superjets_goal_award (void) {
	sound_start (ST_SPEECH, SPCH_SUPERJETS_COMPLETED, SL_4S, PRI_GAME_QUICK3);
	score (SUPERJETS_GOAL_SCORE);
	score_add (superjets_mode_score, score_table[SUPERJETS_GOAL_SCORE]);
	if (superjets_goal < SUPERJETS_GOAL_MAX)  superjets_goal += SUPERJETS_GOAL_STEP;
	timed_mode_end (&superjets_mode);
}//END OF FUNCTION
Ejemplo n.º 16
0
gme_err_t Music_Player::start_track( int track )
{
	if ( emu_ )
	{
		gme_free_info( track_info_ );
		track_info_ = NULL;
		RETURN_ERR( gme_track_info( emu_, &track_info_, track ) );
	
		// Sound must not be running when operating on emulator
		sound_stop();
		RETURN_ERR( gme_start_track( emu_, track ) );
		
		// Calculate track length
		if ( track_info_->length <= 0 )
			track_info_->length = track_info_->intro_length +
						track_info_->loop_length * 2;
		
		if ( track_info_->length <= 0 )
			track_info_->length = (long) (2.5 * 60 * 1000);
		gme_set_fade( emu_, track_info_->length );
		
		paused = false;
		sound_start();
	}
	return 0;
}
Ejemplo n.º 17
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
Ejemplo n.º 18
0
VbError_t VbExBeep(uint32_t msec, uint32_t frequency)
{
	int res;
        if (frequency) {
                res = sound_start(frequency);
        } else {
                res = sound_stop();
	}

	if (res > 0) {
		// The previous call had an error.
		return VBERROR_UNKNOWN;
	} else if (res < 0) {
		// Non-blocking beeps aren't supported.
		if (msec > 0 && sound_play(msec, frequency))
			return VBERROR_UNKNOWN;
		return VBERROR_NO_BACKGROUND_SOUND;
	} else {
		// The non-blocking call worked. Delay if requested.
		if (msec > 0) {
			mdelay(msec);
			if (sound_stop())
				return VBERROR_UNKNOWN;
		}
		return VBERROR_SUCCESS;
        }
}
Ejemplo n.º 19
0
void driver_device::device_start()
{
	// reschedule ourselves to be last
	for (device_t &test : device_iterator(*this))
		if (&test != this && !test.started())
			throw device_missing_dependencies();

	// call the game-specific init
	m_system->driver_init(*this);

	// finish image devices init process
	machine().image().postdevice_init();

	// start the various pieces
	driver_start();

	if (!m_callbacks[CB_MACHINE_START].isnull())
		m_callbacks[CB_MACHINE_START]();
	else
		machine_start();

	if (!m_callbacks[CB_SOUND_START].isnull())
		m_callbacks[CB_SOUND_START]();
	else
		sound_start();

	if (!m_callbacks[CB_VIDEO_START].isnull())
		m_callbacks[CB_VIDEO_START]();
	else
		video_start();

	// save generic states
	save_item(NAME(m_flip_screen_x));
	save_item(NAME(m_flip_screen_y));
}
Ejemplo n.º 20
0
void fortress_start_sounds (void) {
	U8 i;
	for(i = 0; i < 8; i++) {
		sound_start (ST_EFFECT, HELICOPTER, SL_1S, PRI_GAME_QUICK5);
		task_sleep (TIME_500MS);
	}
	task_exit();
}//end of function
Ejemplo n.º 21
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
Ejemplo n.º 22
0
void cryoprison_start_sounds (void) {
	U8 i;
	for(i = 0; i < 6; i++) {
		sound_start (ST_ANY, SIREN, SL_1S, PRI_GAME_QUICK5);
		task_sleep (TIME_500MS);
	}
	task_exit();
}//end of function
Ejemplo n.º 23
0
void Music_Player::pause( int b )
{
	paused = b;
	if ( b )
		sound_stop();
	else
		sound_start();
}
Ejemplo n.º 24
0
void car_chase_start_effect_deff(void) {
	sound_start (ST_SAMPLE, CAR_SKID, SL_2S, PRI_GAME_QUICK5);

	car_chase_animation_display_effect (IMG_CARCHASE_A_START, IMG_CARCHASE_A_END);
	car_chase_animation_display_effect (IMG_CARCHASE_B_START, IMG_CARCHASE_B_END);
	car_chase_animation_display_effect (IMG_CARCHASE_C_START, IMG_CARCHASE_C_END);
	car_chase_animation_display_effect (IMG_CARCHASE_D_START, IMG_CARCHASE_D_END);

	dmd_sched_transition (&trans_scroll_left_fast);
	dmd_alloc_low_clean ();

	sound_start (ST_SAMPLE, CAR_SKID, SL_2S, PRI_GAME_QUICK5);

	font_render_string_center (&font_fipps, DMD_MIDDLE_X, DMD_BIG_CY_Cent, "SHOOT RAMPS");
	dmd_show_low ();
	task_sleep_sec (1);
	deff_exit ();
}//end of mode_effect_deff
Ejemplo n.º 25
0
//if a ball drains during the mode and with time still on the ballsave timer - send it back in play
CALLSET_BOOL_ENTRY (cryoprison, ball_drain) { //thrown by device.c
	if	(flag_test(FLAG_IS_CRYOPRISON_MB_RUNNING)
		&& cryoprison_ballsave)	{
		sound_start (ST_SPEECH, SPCH_JOHN_SCREAM, SL_2S, PRI_GAME_QUICK5);
		serve_ball_auto ();
		return FALSE; //this is not a valid drain, don't count it
	}
	else return TRUE; //this is a valid drain
}//end of callset
Ejemplo n.º 26
0
CALLSET_ENTRY (shot, sw_skid_pad_exit)
{
	if (!task_kill_gid (GID_SKID_PAD_MADE)) {
		return;
	}
	sound_start (ST_SAMPLE, SND_TIRE_SCREECH_03, SL_2S, PRI_GAME_QUICK5);
	callset_invoke (skid_pad_shot);

}
Ejemplo n.º 27
0
void car_chase_mode_init (void) {
	car_chase_mode_shots_made = 0;
	flag_on (FLAG_IS_CARCHASE_MODE_RUNNING);
	ballsave_add_time (10);
	++car_chase_modes_achieved;
	diverter_stop();//defined in divhold2.ct
	task_kill_gid (GID_CR_LIGHTS);
	carchase_mode_on(); //at ramps.c
	serve_ball_auto(); //add one ball to the playfield - NOT a multiball since doesn't change global ball count
	sound_start (ST_SPEECH, SPCH_WUSS_SPARTAN, SL_4S, PRI_GAME_QUICK5);
	task_sleep_sec (2);
	sound_start (ST_SPEECH, SPCH_EXCUSE_ME, SL_4S, PRI_GAME_QUICK5);
	task_sleep_sec (1);
	sound_start (ST_SPEECH, SPCH_BETWEEN_YOU_N_ME, SL_4S, PRI_GAME_QUICK5);
	//flash lamp for a time
	score_zero(car_chase_mode_score);

	lamp_tristate_off (LM_CLAW_READY);
}//end of function
Ejemplo n.º 28
0
CALLSET_ENTRY (kickback, sw_kickback)
{
	if (kickback_enabled ())
	{
		sound_start (ST_SAMPLE, SND_WHISTLE, SL_2S, PRI_GAME_QUICK3);
		task_recreate_gid (GID_KICKBACK_FINISH, kickback_finish);
	}
	else
	{
		callset_invoke (sw_left_outlane);
	}
}
Ejemplo n.º 29
0
/****************************************************************************
 *
 * display effects
 *
 ****************************************************************************/
void freeze_effect_deff(void) {
	U16 fno;
	dmd_alloc_pair_clean ();
	sound_start (ST_EFFECT, SIREN, SL_4S, PRI_GAME_QUICK5);

		for (fno = IMG_CONTROLLER_START; fno <= IMG_FREEZE_A_END; fno += 2) {
			dmd_alloc_pair_clean ();
			frame_draw(fno);
			dmd_show2 ();
			task_sleep (TIME_100MS);
		}//end of inner loop
		task_sleep (TIME_300MS);

		dmd_alloc_pair_clean ();// Clean both pages
			dmd_map_overlay ();
			dmd_clean_page_low ();
			if ( flag_test(FLAG_IS_MULTIBALL_ENABLED) ) {
						font_render_string_center (&font_halobold12, DMD_MIDDLE_X, DMD_BIG_CY_Top, "MULTIBALL");
						font_render_string_center (&font_halobold12, DMD_MIDDLE_X + 10, DMD_BIG_CY_Bot, "READY");
			}
			else {
						font_render_string_center (&font_halobold12, DMD_MIDDLE_X, DMD_BIG_CY_Top, "FREEZE");
			}
			dmd_text_outline ();
			dmd_alloc_pair ();
			frame_draw(IMG_FREEZE_A_END);
			dmd_overlay_outline ();
			dmd_show2 ();

	if (DM_IN_DMD_TEST) freeze_MessageCounter++;
	if (flag_test(FLAG_IS_MULTIBALL_ENABLED)) {
		if ( (lock_SoundCounter++ % 2) == 0 )//check if even
			sound_start (ST_SPEECH, SPCH_MULTIBALL_ACTIVATED, SL_4S, PRI_GAME_QUICK5);
		else
			sound_start (ST_SPEECH, SPCH_SHOOT_LEFT_LOOP, SL_4S, PRI_GAME_QUICK5);
	}

	task_sleep_sec (1);
	deff_exit ();
}//end of mode_effect_deff
Ejemplo n.º 30
0
void extra_ball_effect_deff(void) {
	U8 eb_rnd_sound;
	U16 fno;
	dmd_alloc_pair_clean ();// Clean both pages
	eb_rnd_sound = random_scaled(2);
	sound_start (ST_EFFECT, EXTRA_BALL_SOUND, SL_2S, SP_NORMAL);

	for (fno = IMG_FREEZER1_START; fno <= IMG_FREEZER1_END; fno += 2) {
				dmd_alloc_pair ();
				frame_draw(fno);
				dmd_show2 ();
				task_sleep (TIME_66MS);
	}//end of for loop

	for (fno = IMG_FREEZER2_START; fno <= IMG_FREEZER2_END; fno += 2) {
				dmd_alloc_pair ();
				frame_draw(fno);
				dmd_show2 ();
				task_sleep (TIME_66MS);
	}//end of for loop

	if (eb_rnd_sound) 	sound_start (ST_SPEECH, SPCH_EXTRABALL_WES, SL_2S, SP_NORMAL);
	else 				sound_start (ST_SPEECH, SPCH_EXTRABALL_SLY, SL_2S, SP_NORMAL);

	for (fno = IMG_FREEZER3_START; fno <= IMG_FREEZER3_END; fno += 2) {
					dmd_map_overlay ();
					dmd_clean_page_low ();
					font_render_string_center (&font_fireball, DMD_MIDDLE_X - 25, DMD_BIG_CY_Top, "EXTRA");
					font_render_string_center (&font_fireball, DMD_MIDDLE_X - 25, DMD_BIG_CY_Bot, "BALL");
						dmd_text_outline ();
						dmd_alloc_pair ();
						frame_draw(fno);
						dmd_overlay_outline ();
						dmd_show2 ();
						task_sleep (TIME_66MS);
			}//end of for loop

	deff_exit ();
}//end of mode_effect_deff