void huxley_frame_with_words_display_fipps_effect (U16 frame, U8 x, U8 y, char *words){ dmd_alloc_pair_clean ();// Clean both pages dmd_map_overlay (); dmd_clean_page_low (); font_render_string_center (&font_fipps, x, y, words); dmd_text_outline (); dmd_alloc_pair (); frame_draw(frame); dmd_overlay_outline (); dmd_show2 (); task_sleep (TIME_100MS); }
void clock_millions_hit_deff (void) { U16 fno; U16 img_start = 0; U16 img_end = 0; dmd_alloc_pair_clean (); switch (random_scaled (3)) { case 0: img_start = IMG_FLASH_START; img_end = IMG_FLASH_END; break; case 1: img_start = IMG_FLASHCENTRE_START; img_end = IMG_FLASHCENTRE_END; break; case 2: img_start = IMG_FLASHLEFT_START; img_end = IMG_FLASHLEFT_END; break; } for (fno = img_start; fno < img_end; fno += 2) { U8 x = random_scaled (4); U8 y = random_scaled (4); dmd_map_overlay (); dmd_clean_page_low (); psprintf ("CLOCK HIT %d TIME", "CLOCK HIT %d TIMES", clock_mode_hits); font_render_string_center (&font_fixed6, 64 + x, 10 + y, sprintf_buffer); sprintf_score (clock_mode_score); font_render_string_center (&font_var5, 64, 21, sprintf_buffer); dmd_text_outline (); dmd_alloc_pair (); frame_draw (fno); dmd_overlay_outline (); dmd_show2 (); task_sleep (TIME_33MS); } /* Redraw it so the 'HITS' text is centred */ dmd_clean_page_low (); dmd_clean_page_high (); dmd_alloc_low (); psprintf ("CLOCK HIT %d TIME", "CLOCK HIT %d TIMES", clock_mode_hits); font_render_string_center (&font_fixed6, 64, 10, sprintf_buffer); sprintf_score (clock_mode_score); font_render_string_center (&font_var5, 64, 21, sprintf_buffer); dmd_show_low (); task_sleep_sec (2); deff_exit (); }
void fortress_frame_with_words_display_steel_effect (U16 frame, U8 x, U8 y, char *words){ dmd_alloc_pair_clean ();// Clean both pages dmd_map_overlay (); dmd_clean_page_low (); font_render_string_center (&font_halobold12, DMD_MIDDLE_X, DMD_BIG_CY_Top, "FORTRESS"); font_render_string_center (&font_halobold12, x, y, words); dmd_text_outline (); dmd_alloc_pair (); frame_draw(frame); dmd_overlay_outline (); dmd_show2 (); task_sleep (TIME_500MS); }
void cryoprison_frame_with_words_display_steel_effect (U16 frame, U8 x, U8 y, char *words){ dmd_alloc_pair_clean ();// Clean both pages dmd_map_overlay (); dmd_clean_page_low (); font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, "CRYOPRISON"); font_render_string_center (&font_steel, x, y, words); dmd_text_outline (); dmd_alloc_pair (); frame_draw(frame); dmd_overlay_outline (); dmd_show2 (); task_sleep (TIME_100MS); }
/**************************************************************************** * * 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
void sslot_award_deff (void) { sprintf_score (score_deff_get ()); U16 fno; U8 y = 20; for (fno = IMG_ODDCHANGE_START; fno < IMG_ODDCHANGE_END; fno += 2) { dmd_alloc_pair_clean (); y--; dmd_map_overlay (); dmd_clean_page_low (); font_render_string_center (&font_var5, 64, y, "SLOT MACHINE AWARD"); dmd_text_outline (); dmd_alloc_pair (); frame_draw (fno); dmd_overlay_outline (); dmd_show2 (); task_sleep (TIME_16MS); } for (fno = IMG_FLASHCENTRE_START; fno < IMG_FLASHCENTRE_END; fno += 2) { dmd_alloc_pair_clean (); dmd_map_overlay (); dmd_clean_page_low (); font_render_string_center (&font_var5, 64, y, "SLOT MACHINE AWARD"); font_render_string_center (&font_bitcube10, 64, 20, sslot_award_names[sslot_award_index_stored]); dmd_text_outline (); dmd_alloc_pair (); frame_draw (fno); dmd_overlay_outline (); dmd_show2 (); task_sleep (TIME_16MS); } task_sleep_sec (2); deff_exit (); }
void huxley_effect_deff(void) { U8 frame = 0; U8 frame_counter = 0; for (;;) { //change the background every 5 seconds or so if (++frame_counter % 10 == 0) { if (frame >= 11) frame = 0; else frame ++; play_huxley_sounds(); } dmd_alloc_pair_clean(); dmd_map_overlay (); dmd_clean_page_low (); dmd_draw_thin_border (dmd_low_buffer); sprintf_score(current_score); font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_1, sprintf_buffer); sprintf ("%d", huxley_mode_timer); font_render_string_center (&font_var5, DMD_MIDDLE_X - 50, DMD_SMALL_CY_5, sprintf_buffer); font_render_string_center (&font_var5, DMD_MIDDLE_X + 50, DMD_SMALL_CY_5, sprintf_buffer); sprintf_score (huxley_mode_score); font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_5, sprintf_buffer); switch (frame) { case 0: font_render_string_center (&font_fipps, DMD_MIDDLE_X + 35, DMD_BIG_CY_Top + 5, "HUXLEY"); break; //ok case 2: font_render_string_center (&font_fipps, DMD_MIDDLE_X + 35, DMD_BIG_CY_Bot, "HUXLEY"); break; //ok case 4: font_render_string_center (&font_fipps, DMD_MIDDLE_X + 35, DMD_BIG_CY_Bot, "HUXLEY"); break; //ok case 6: font_render_string_center (&font_fipps, DMD_MIDDLE_X + 35, DMD_BIG_CY_Bot, "HUXLEY"); break; //ok case 8: font_render_string_center (&font_fipps, DMD_MIDDLE_X + 35, DMD_BIG_CY_Top + 5, "HUXLEY"); break; //ok case 10: font_render_string_center (&font_fipps, DMD_MIDDLE_X - 35, DMD_BIG_CY_Top + 5, "HUXLEY"); break; //ok }//end of switch dmd_text_outline (); dmd_alloc_pair (); switch (frame) { default: case 0: frame_draw(IMG_HUXLEY_END_SCENE_START); break; case 1: frame_draw(IMG_HUXLEY_END_SCENE_1); break; case 2: frame_draw(IMG_HUXLEY_END_SCENE_2); break; case 3: frame_draw(IMG_HUXLEY_END_SCENE_3); break; case 4: frame_draw(IMG_HUXLEY_END_SCENE_4); break; case 5: frame_draw(IMG_HUXLEY_END_SCENE_5); break; case 6: frame_draw(IMG_HUXLEY_END_SCENE_6); break; case 7: frame_draw(IMG_HUXLEY_END_SCENE_7); break; case 8: frame_draw(IMG_HUXLEY_END_SCENE_8); break; case 9: frame_draw(IMG_HUXLEY_END_SCENE_9); break; case 10: frame_draw(IMG_HUXLEY_END_SCENE_10); break; case 11: frame_draw(IMG_HUXLEY_END_SCENE_11); break; }//end of switch dmd_overlay_outline (); dmd_show2 (); task_sleep (TIME_500MS); }//END OF ENDLESS LOOP }//end of mode_effect_deff
void car_chase_animation_display_effect_w_words (U16 start_frame, U16 end_frame){ U16 fno; dmd_alloc_pair_clean ();// Clean both pages for (fno = start_frame; fno <= end_frame; fno += 2) { dmd_map_overlay (); dmd_clean_page_low (); font_render_string_center (&font_fipps, DMD_MIDDLE_X - 20, DMD_BIG_CY_Top, "CAR_CHASE"); dmd_text_outline (); dmd_alloc_pair (); frame_draw(fno); dmd_overlay_outline (); dmd_show2 (); task_sleep (TIME_100MS); }//end of inner loop }//end of mode_effect_deff
void huxley_info_effect_deff(void) { U16 fno; dmd_alloc_pair_clean (); dmd_sched_transition (&trans_bitfade_slow); for (fno = IMG_HUXLEY_B2_START; fno <= IMG_HUXLEY_B2_END; fno += 2) { dmd_map_overlay (); dmd_clean_page_low (); font_render_string_center (&font_fipps, DMD_MIDDLE_X - 20, DMD_BIG_CY_Bot, "HUXLEY"); dmd_text_outline (); dmd_alloc_pair (); frame_draw(fno); dmd_overlay_outline (); dmd_show2 (); task_sleep (TIME_100MS); }//end of for loop deff_exit (); }//end of mode_effect_deff
void tsm_mode_total_deff (void) { dmd_alloc_pair_clean (); dmd_map_overlay (); dmd_clean_page_low (); font_render_string_center (&font_fixed6, 64, 5, "TSM OVER"); sprintf_score (tsm_mode_total); font_render_string_center (&font_fixed6, 64, 16, sprintf_buffer); font_render_string_center (&font_var5, 64, 27, "POINTS EARNED FROM MODE"); dmd_text_outline (); dmd_alloc_pair (); frame_draw (IMG_CITY); dmd_overlay_outline (); dmd_show2 (); task_sleep_sec (2); dmd_sched_transition (&trans_bitfade_fast); deff_exit (); }
void sssmb_running_deff (void) { U16 fno; for (;;) { for (fno = IMG_BOLT_TESLA_START; fno <= IMG_BOLT_TESLA_END; fno += 2) { dmd_alloc_pair_clean (); dmd_map_overlay (); dmd_clean_page_low (); font_render_string_left (&font_bitoutline, 1, 1, "SKILL"); font_render_string_left (&font_quadrit, 54, 2, "MULTIBALL"); sprintf_current_score (); font_render_string_center (&font_cowboy, 64, 16, sprintf_buffer); if (timer_find_gid (GID_SSSMB_DIVERT_DEBOUNCE)) { sprintf ("SKILL SHOT SCORES JACKPOT"); } else if (sssmb_ramps_to_divert == 0) { sprintf ("SHOOT LEFT RAMP NOW"); } else if (sssmb_ramps_to_divert == 1) { sprintf ("1 RAMP FOR SKILL SHOT"); } else { sprintf ("%d RAMPS FOR SKILL SHOT", sssmb_ramps_to_divert); } font_render_string_center (&font_var5, 64, 26, sprintf_buffer); dmd_text_outline (); dmd_alloc_pair (); frame_draw (fno); dmd_overlay_outline (); dmd_show2 (); task_sleep (TIME_66MS); } } }
void jets_level_up_deff (void) { dmd_alloc_pair_clean (); U16 fno; sound_send (SND_GLASS_BREAKS); for (fno = IMG_EXPLODE_START; fno < IMG_EXPLODE_END; fno += 2) { dmd_map_overlay (); dmd_clean_page_low (); if (fno > 4) { sprintf ("TOWN SQUARE LEVEL %d", jets_bonus_level); font_render_string_center (&font_mono5, 64, 7, sprintf_buffer); /* We don't use scoreget as it's likely another score * has been awarded */ sprintf("%d MILLION", jetscore); font_render_string_center (&font_fireball, 64, 20, sprintf_buffer); } dmd_text_outline (); dmd_alloc_pair (); frame_draw (fno); callset_invoke (score_overlay); dmd_overlay_outline (); dmd_show2 (); task_sleep (TIME_33MS); } for (fno = 0; fno < 10; fno++) { dmd_alloc_pair_clean (); sprintf ("TOWN SQUARE LEVEL %d", jets_bonus_level); font_render_string_center (&font_mono5, 64, 7, sprintf_buffer); /* We don't use scoreget as it's likely another score * has been awarded */ sprintf("%d MILLION", jetscore); font_render_string_center (&font_fireball, 64, 20, sprintf_buffer); dmd_copy_low_to_high (); callset_invoke (score_overlay); dmd_show2 (); task_sleep (TIME_100MS); } deff_exit (); }
void fortress_effect_deff (void) { dmd_alloc_pair_clean(); for (;;) { dmd_map_overlay (); dmd_clean_page_low (); dmd_draw_thin_border (dmd_low_buffer); if (fortress_ballsave) { sprintf ("BS"); font_render_string_center (&font_var5, 6, 12, sprintf_buffer); } sprintf_score(current_score); font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_3+1, sprintf_buffer); font_render_string_center (&font_halobold12, DMD_MIDDLE_X, DMD_BIG_CY_Top, "FORTRESS"); if (fortress_display_counter % 10 != 0) { //draw for 9/10 and blank for 1/10 if (FORT_TOGGLE == 0) { sprintf ("10 MILLION"); font_render_string_center (&font_fixed6, DMD_MIDDLE_X, DMD_BIG_CY_Bot+1, sprintf_buffer); } else if (FORT_TOGGLE == 1) { sprintf ("JACKPOT LIT"); font_render_string_center (&font_fixed6, DMD_MIDDLE_X, DMD_BIG_CY_Bot+1, sprintf_buffer); } else if (FORT_TOGGLE == 2) { sprintf ("%d JACKPOTS MADE", fortress_jackpot_shots_made); font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_4, sprintf_buffer); if (get_is_super_jackpot_lit()) sprintf ("SUPER JACKPOT LIT"); else sprintf ("SHOOT %d TO LIGHT SUPER", 5 - (fortress_jackpot_shots_made % 5) ); font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_BOTTOM_LINE, sprintf_buffer); } } else sprintf (""); dmd_text_outline (); dmd_alloc_pair (); frame_draw(IMG_FORTRESS_RUN_0 + fortress_effect_deff_table[fortress_display_counter]); dmd_overlay_outline (); dmd_show2 (); task_sleep (TIME_200MS); if (++fortress_display_counter >= 30) fortress_display_counter = 0; if (fortress_display_counter % 20 == 0) { if (++FORT_TOGGLE > 2) FORT_TOGGLE = 0; //change FORT_TOGGLE once per if (DM_IN_DMD_TEST) score (FORTRESS_MB_SCORE); } }//END OF ENDLESS LOOP }//end of function
static inline void show_sonny_jim (void) { amode_page_start (); dmd_alloc_pair_clean (); /* Draw a 'white' background for the transition */ dmd_invert_page (dmd_low_buffer); dmd_invert_page (dmd_high_buffer); dmd_show2 (); /* sonny_jim should emerge from the bottom */ dmd_sched_transition (&trans_scroll_up); dmd_alloc_pair (); frame_draw (IMG_SONNY_JIM); /* Start the transition */ dmd_show2 (); /* Paint the text on */ dmd_map_overlay (); dmd_clean_page_low (); font_render_string_right (&font_var5, 126, 7, "NOT AN ORDINARY DAY OR"); font_render_string_right (&font_var5, 122, 18, "AN ORDINARY PLAYER"); dmd_text_outline (); dmd_alloc_pair (); frame_draw (IMG_SONNY_JIM); dmd_overlay_outline (); dmd_show2 (); task_create_anon (amode_talking_task); amode_sleep_sec (4); /* Now just draw sonny_jim again */ dmd_alloc_pair (); frame_draw (IMG_SONNY_JIM); dmd_show2 (); /* Exit stage right */ dmd_sched_transition (&trans_scroll_down); /* Draw a 'white' background for the transition again */ dmd_alloc_pair_clean (); dmd_invert_page (dmd_low_buffer); dmd_invert_page (dmd_high_buffer); dmd_show2 (); dmd_sched_transition (&trans_bitfade_slow); }
/**************************************************************************** * * 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
void match_loop_deff (void) { U16 fno; dmd_alloc_pair_clean (); for (;;) { for (fno = IMG_MATCH_START; fno <= IMG_MATCH_END; fno += 2) { dmd_map_overlay (); dmd_clean_page_low (); font_render_string_right (&font_fixed6, 126, 1, "MATCH"); dmd_text_outline (); dmd_alloc_pair (); frame_draw (fno); dmd_overlay_outline (); dmd_show2 (); task_sleep (TIME_33MS); } } deff_exit (); }
static inline void show_bcd (void) { amode_page_start (); dmd_sched_transition (&trans_random_boxfade); dmd_alloc_pair_clean (); /* Draw a 'white' background for the transition */ dmd_invert_page (dmd_low_buffer); dmd_invert_page (dmd_high_buffer); dmd_show2 (); /* bcd should emerge from the right */ dmd_sched_transition (&trans_scroll_left); dmd_alloc_pair (); frame_draw (IMG_BCD); /* Start the transition */ dmd_show2 (); /* Paint the text on */ dmd_map_overlay (); dmd_clean_page_low (); font_render_string_center (&font_var5, 38, 10, "HEY ITS ONLY"); font_render_string_center (&font_steel, 38, 20, "PINBALL"); dmd_text_outline (); dmd_alloc_pair (); frame_draw (IMG_BCD); dmd_overlay_outline (); dmd_show2 (); sound_send (SND_HEY_ITS_ONLY_PINBALL); amode_sleep_sec (3); /* Now just draw bcd again */ dmd_alloc_pair (); frame_draw (IMG_BCD); dmd_show2 (); /* Exit stage right */ dmd_sched_transition (&trans_scroll_right); /* Draw a 'white' background for the transition again */ dmd_alloc_pair_clean (); dmd_invert_page (dmd_low_buffer); dmd_invert_page (dmd_high_buffer); dmd_show2 (); }
void hitch_mode_deff (void) { dmd_alloc_pair_clean (); for (;;) { dmd_map_overlay (); dmd_clean_page_low (); font_render_string_center (&font_nayupixel10, 64, 5, "SHOOT HITCHHIKER"); sprintf_current_score (); font_render_string_center (&font_antiqua, 64, 13, sprintf_buffer); font_render_string_center (&font_nayupixel10, 64, 27, "FOR 10M"); sprintf ("%d", hitch_mode_timer); font_render_string (&font_var5, 2, 2, sprintf_buffer); font_render_string_right (&font_var5, 126, 2, sprintf_buffer); dmd_text_outline (); dmd_alloc_pair (); frame_draw (IMG_HITCHHIKER_START); dmd_overlay_outline (); dmd_show2 (); task_sleep (TIME_200MS); } }
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
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 (); }
void tsm_mode_deff (void) { dmd_alloc_pair_clean (); for (;;) { dmd_map_overlay (); dmd_clean_page_low (); font_render_string_center (&font_var5, 64, 5, "TOWN SQUARE MADNESS"); sprintf_current_score (); font_render_string_center (&font_fixed6, 64, 16, sprintf_buffer); font_render_string_center_ytop (&font_nayupixel10, 64, 22, "JETS AT 500K"); sprintf ("%d", tsm_mode_timer); font_render_string (&font_var5, 2, 2, sprintf_buffer); font_render_string_right (&font_var5, 126, 2, sprintf_buffer); dmd_text_outline (); dmd_alloc_pair (); frame_draw (IMG_CITY); dollar_overlay (); dmd_overlay_outline (); dmd_show2 (); task_sleep (TIME_66MS); } }
void rollovers_mtl_effect(void) { U16 fno; dmd_alloc_pair_clean ();// Clean both pages rollover_SoundCounter = random_scaled(3);//from kernal/random.c if ( rollover_SoundCounter == 0 ) sound_start (ST_EFFECT, MACHINE1_SHORT, SL_2S, PRI_GAME_QUICK5); else if ( rollover_SoundCounter == 1 ) sound_start (ST_EFFECT, MACHINE1_MED, SL_2S, PRI_GAME_QUICK5); else if ( rollover_SoundCounter == 2 ) sound_start (ST_EFFECT, MACHINE1_LONG, SL_2S, PRI_GAME_QUICK5); for (fno = IMG_GUN_START; fno <= IMG_GUN_END; fno += 2) { sprintf ("M T L"); dmd_map_overlay (); dmd_clean_page_low (); font_render_string_center (&font_fireball, DMD_MIDDLE_X, DMD_BIG_CY_Cent, sprintf_buffer); dmd_text_outline (); dmd_alloc_pair (); frame_draw(fno); dmd_overlay_outline (); dmd_show2 (); task_sleep (TIME_100MS); }//end of for loop }//end of mode_effect_deff
void all_rollovers_effect_deff(void) { U16 fno; dmd_alloc_pair_clean ();// Clean both pages rollover_SoundCounter = random_scaled(3);//from kernal/random.c if ( rollover_SoundCounter == 0 ) sound_start (ST_EFFECT, STORM1_SHORT, SL_2S, PRI_GAME_QUICK5); else if ( rollover_SoundCounter == 1 ) sound_start (ST_EFFECT, STORM1_MED, SL_2S, PRI_GAME_QUICK5); else if ( rollover_SoundCounter == 2 ) sound_start (ST_EFFECT, STORM1_LONG, SL_2S, PRI_GAME_QUICK5); rollovers_animation_display_effect_reverse (IMG_GUN_END, IMG_GUN_START); rollover_SoundCounter = random_scaled(3);//from kernal/random.c if ( rollover_SoundCounter == 0 ) sound_start (ST_EFFECT, STORM1_SHORT, SL_2S, PRI_GAME_QUICK5); else if ( rollover_SoundCounter == 1 ) sound_start (ST_EFFECT, STORM1_MED, SL_2S, PRI_GAME_QUICK5); else if ( rollover_SoundCounter == 2 ) sound_start (ST_EFFECT, STORM1_LONG, SL_2S, PRI_GAME_QUICK5); dmd_alloc_pair_clean ();// Clean both pages for (fno = IMG_GUN_START; fno <= IMG_GUN_END; fno += 2) { switch (rollover_bonus_multiplier) { default: case 2: sprintf ("2 X"); break; case 3: sprintf ("3 X"); break; case 4: sprintf ("4 X"); break; case 5: sprintf ("5 X"); break; }//end of switch dmd_map_overlay (); dmd_clean_page_low (); font_render_string_center (&font_fireball, DMD_MIDDLE_X + 30, DMD_BIG_CY_Cent, sprintf_buffer); dmd_text_outline (); dmd_alloc_pair (); frame_draw(fno); dmd_overlay_outline (); dmd_show2 (); task_sleep (TIME_100MS); }//end of for loop rollover_SoundCounter = random_scaled(3);//from kernal/random.c if ( rollover_SoundCounter == 0 ) sound_start (ST_EFFECT, STORM1_SHORT, SL_2S, PRI_GAME_QUICK5); else if ( rollover_SoundCounter == 1 ) sound_start (ST_EFFECT, STORM1_MED, SL_2S, PRI_GAME_QUICK5); else if ( rollover_SoundCounter == 2 ) sound_start (ST_EFFECT, STORM1_LONG, SL_2S, PRI_GAME_QUICK5); dmd_alloc_pair_clean ();// Clean both pages for (fno = IMG_GUN_END; fno >= IMG_GUN_START; fno -= 2) { sprintf ("BONUS"); dmd_map_overlay (); dmd_clean_page_low (); font_render_string_center (&font_fireball, DMD_MIDDLE_X + 30, DMD_BIG_CY_Cent, sprintf_buffer); font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_5, "CLAW LIT"); dmd_text_outline (); dmd_alloc_pair (); frame_draw(fno); dmd_overlay_outline (); dmd_show2 (); task_sleep (TIME_100MS); }//end of for loop rollover_SoundCounter = random_scaled(3);//from kernal/random.c if ( rollover_SoundCounter == 0 ) sound_start (ST_EFFECT, STORM1_SHORT, SL_2S, PRI_GAME_QUICK5); else if ( rollover_SoundCounter == 1 ) sound_start (ST_EFFECT, STORM1_MED, SL_2S, PRI_GAME_QUICK5); else if ( rollover_SoundCounter == 2 ) sound_start (ST_EFFECT, STORM1_LONG, SL_2S, PRI_GAME_QUICK5); task_sleep_sec (1); deff_exit (); }//end of mode_effect_deff
void top_popper_effect_deff(void) { U16 fno; if (IN_TEST) { if (++top_popper_MessageCounter > 3) top_popper_MessageCounter = 0; } else top_popper_MessageCounter = random_scaled(3); dmd_alloc_pair_clean ();// Clean both pages switch (top_popper_MessageCounter) { default: case 0: sound_start (ST_EFFECT, TRAIN_PULL_IN, SL_2S, SP_NORMAL); for (fno = IMG_SIMON_E_END-2; fno >= IMG_SIMON_E_START; fno -= 2) { dmd_alloc_pair (); frame_draw(fno); dmd_show2 (); task_sleep (TIME_100MS); }//end of for loop sound_start (ST_EFFECT, TRAIN_PULL_IN, SL_2S, SP_NORMAL); for (fno = IMG_SIMON_E_START; fno <= IMG_SIMON_E_END; fno += 2) { dmd_map_overlay (); dmd_clean_page_low (); font_render_string_center (&font_term6, DMD_MIDDLE_X, DMD_MED_CY_1, "LIGHT ALL M T L"); font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_MED_CY_2, "5 TIMES TO"); font_render_string_center (&font_bitcube10, DMD_MIDDLE_X, DMD_MED_CY_3, "LIGHT EXTRA BALL"); dmd_text_outline (); dmd_alloc_pair (); frame_draw(fno); dmd_overlay_outline (); dmd_show2 (); task_sleep (TIME_100MS); }//end of for loop break; case 1: sound_start (ST_EFFECT, COMPUTER3, SL_2S, SP_NORMAL); for (fno = IMG_CLAW_B_START; fno <= IMG_CLAW_B_END; fno += 2) { dmd_alloc_pair (); frame_draw(fno); dmd_show2 (); task_sleep (TIME_100MS); }//end of for loop sound_start (ST_EFFECT, COMPUTER3, SL_2S, SP_NORMAL); dmd_map_overlay (); dmd_clean_page_low (); font_render_string_center (&font_term6, DMD_MIDDLE_X, DMD_MED_CY_1, "SHOOT EYEBALL"); font_render_string_center (&font_term6, DMD_MIDDLE_X, DMD_MED_CY_2, "TO LIGHT"); font_render_string_center (&font_bitcube10, DMD_MIDDLE_X, DMD_MED_CY_3, "EXTRA BALL"); dmd_text_outline (); dmd_alloc_pair (); frame_draw(IMG_CLAW_B_END); dmd_overlay_outline (); dmd_show2 (); break; case 2: sound_start (ST_EFFECT, COMPUTER3, SL_2S, SP_NORMAL); for (fno = IMG_CLAW_A_START; fno <= IMG_CLAW_A_END; fno += 2) { dmd_alloc_pair (); frame_draw(fno); dmd_show2 (); task_sleep (TIME_100MS); }//end of for loop sound_start (ST_EFFECT, COMPUTER3, SL_2S, SP_NORMAL); dmd_map_overlay (); dmd_clean_page_low (); font_render_string_center (&font_term6, DMD_MIDDLE_X, DMD_MED_CY_1, "SHOOT COMBOS"); font_render_string_center (&font_term6, DMD_MIDDLE_X, DMD_MED_CY_2, "TO LIGHT"); font_render_string_center (&font_bitcube10, DMD_MIDDLE_X, DMD_MED_CY_3, "VIDEO MODE"); dmd_text_outline (); dmd_alloc_pair (); frame_draw(IMG_CLAW_A_END); dmd_overlay_outline (); dmd_show2 (); break; }//END OF SWITCH deff_exit (); }//end of mode_effect_deff
/**************************************************************************** * * display effects * ****************************************************************************/ void combo_effect_deff(void) { U16 fno; if (IN_TEST) combo_counter++; sound_start (ST_EFFECT, SUBWAY2, SL_2S, SP_NORMAL); if (combo_counter % 2 == 0) { 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 (); if (flag_test (FLAG_IS_COMPUTER_ACTIVATED) ) sprintf ("COMPUTER READY"); else sprintf ("%d TO COMPUTER", combo_goal - combo_counter); font_render_string_center (&font_fixed6, DMD_MIDDLE_X, DMD_MED_CY_3, sprintf_buffer); 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 (); }//end f % 2 else { for (fno = IMG_COMBO2_START; fno <= IMG_COMBO2_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 (); if (flag_test (FLAG_VIDEO_MODE_ENABLED) ) { 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"); } else { sprintf ("%d TO", combo_vm_goal - combo_counter); font_render_string_left (&font_term6, 5, DMD_MED_CY_2, sprintf_buffer); font_render_string_left (&font_term6, 50, DMD_MED_CY_3 - 5, "VIDEO MODE"); } sprintf ("%d", combo_counter); font_render_string_center (&font_fixed10, DMD_MIDDLE_X - 20, DMD_MED_CY_1 + 2, sprintf_buffer); dmd_text_outline (); dmd_alloc_pair (); frame_draw(IMG_COMBO2_END); dmd_overlay_outline (); dmd_show2 (); }//end of else task_sleep_sec (2); deff_exit (); }//end of deff
void jets_hit_deff (void) { U16 fno; U16 img_start; U16 img_end; U8 x; U8 y; switch (random_scaled (3)) { case 0: img_start = IMG_FLASH_START; img_end = IMG_FLASH_END; break; default: case 1: img_start = IMG_FLASHCENTRE_START; img_end = IMG_FLASHCENTRE_END; break; case 2: img_start = IMG_FLASHLEFT_START; img_end = IMG_FLASHLEFT_END; break; } dmd_alloc_pair_clean (); for (fno = img_start; fno < img_end; fno += 2) { x = random_scaled (4); y = random_scaled (4); dmd_map_overlay (); dmd_clean_page_low (); psprintf ("1 HIT", "%d HITS", jets_scored); font_render_string_center (&font_fireball, 62 + x, 8 + y, sprintf_buffer); sprintf ("TOWNSQUARE LEVEL %d", jets_bonus_level + 1); font_render_string_center (&font_mono5, 64, 22, sprintf_buffer); dmd_text_outline (); dmd_alloc_pair (); frame_draw (fno); callset_invoke (score_overlay); dmd_overlay_outline (); draw_progress_bar (&jets_progress_bar); dmd_show2 (); task_sleep (TIME_33MS); } for (fno = 0; fno < 10; fno++) { dmd_alloc_pair_clean (); dmd_clean_page_low (); psprintf ("1 HIT", "%d HITS", jets_scored); font_render_string_center (&font_fireball, 64, 10, sprintf_buffer); sprintf ("TOWNSQUARE LEVEL %d", jets_bonus_level + 1); font_render_string_center (&font_mono5, 64, 22, sprintf_buffer); /* Copy to the high page so it doesn't look dark */ dmd_copy_low_to_high (); callset_invoke (score_overlay); draw_progress_bar (&jets_progress_bar); dmd_show2 (); task_sleep (TIME_100MS); } deff_exit (); }
void dead_end_deff (void) { dmd_alloc_low_clean(); sound_send (SND_DEAD_END_SCREECH); dmd_sched_transition (&trans_scroll_left); frame_draw (IMG_NEWCAR); dmd_show2 (); dmd_alloc_pair_clean (); U16 fno; sound_send (SND_DEAD_END_CRASH); for (fno = IMG_EXPLODE_START; fno < IMG_EXPLODE_END; fno += 2) { dmd_map_overlay (); dmd_clean_page_low (); U8 x = random_scaled (4); U8 y = random_scaled (4); psprintf ("1 DEAD END", "%d DEAD ENDS", dead_end_count); font_render_string_center (&font_fireball, 64+x, 7+y, sprintf_buffer); dmd_text_outline (); dmd_alloc_pair (); frame_draw (fno); dmd_overlay_outline (); dmd_show2 (); task_sleep (TIME_66MS); } dmd_alloc_pair_clean (); psprintf ("1 DEAD END", "%d DEAD ENDS", dead_end_count); font_render_string_center (&font_fireball, 64, 7, sprintf_buffer); if (extra_ball_lit_from_deadend == FALSE && can_award_extra_ball()) { if (dead_end_count < 3 ) sprintf ("EXTRA BALL AT 3"); else if (dead_end_count == 3) { sound_send (SND_GET_THE_EXTRA_BALL); sprintf ("EXTRA BALL LIT"); } } else if (dead_end_count < 3) { sprintf ("10M AT 3"); } else if (dead_end_count == 3) { sprintf ("10 MILLION"); } else { sprintf (""); } font_render_string_center (&font_nayupixel10, 64, 21, sprintf_buffer); dmd_copy_low_to_high (); dmd_show2 (); task_sleep_sec (2); deff_exit (); }
void rollovers_effect_deff(void) { rollovers_mtl_effect(); rollover_SoundCounter = random_scaled(3);//from kernal/random.c if ( rollover_SoundCounter == 0 ) sound_start (ST_EFFECT, MACHINE1_SHORT, SL_2S, PRI_GAME_QUICK5); else if ( rollover_SoundCounter == 1 ) sound_start (ST_EFFECT, MACHINE1_MED, SL_2S, PRI_GAME_QUICK5); else if ( rollover_SoundCounter == 2 ) sound_start (ST_EFFECT, MACHINE1_LONG, SL_2S, PRI_GAME_QUICK5); dmd_alloc_pair_clean ();// Clean both pages if (IN_TEST) { if (++rollover_MessageCounter > 2) rollover_MessageCounter = 0; } else rollover_MessageCounter = random_scaled(3); switch (rollover_MessageCounter) { default: case 0: dmd_map_overlay (); dmd_clean_page_low (); dmd_sched_transition (&trans_bitfade_slow); font_render_string_center (&font_term6, DMD_MIDDLE_X, DMD_MED_CY_1, "LIGHT M T L"); font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_3, "TO"); font_render_string_center (&font_bitcube10, DMD_MIDDLE_X, DMD_MED_CY_3, "ADVANCE BONUS X"); dmd_text_outline (); dmd_alloc_pair (); frame_draw(IMG_GUN_END); dmd_overlay_outline (); dmd_show2 (); break; case 1: dmd_map_overlay (); dmd_clean_page_low (); dmd_sched_transition (&trans_bitfade_slow); font_render_string_center (&font_term6, DMD_MIDDLE_X, DMD_MED_CY_1, "LIGHT M T L"); font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_SMALL_CY_3, "TO"); font_render_string_center (&font_bitcube10, DMD_MIDDLE_X, DMD_MED_CY_3, "LIGHT CRYOCLAW"); dmd_text_outline (); dmd_alloc_pair (); frame_draw(IMG_GUN_END); dmd_overlay_outline (); dmd_show2 (); break; case 2: dmd_map_overlay (); dmd_clean_page_low (); dmd_sched_transition (&trans_bitfade_slow); font_render_string_center (&font_term6, DMD_MIDDLE_X, DMD_MED_CY_1, "LIGHT M T L"); font_render_string_center (&font_var5, DMD_MIDDLE_X, DMD_MED_CY_2, "5 TIMES TO"); font_render_string_center (&font_bitcube10, DMD_MIDDLE_X, DMD_MED_CY_3, "LIGHT EXTRA BALL"); dmd_text_outline (); dmd_alloc_pair (); frame_draw(IMG_GUN_END); dmd_overlay_outline (); dmd_show2 (); break; }//end of switch rollover_SoundCounter = random_scaled(3);//from kernal/random.c if ( rollover_SoundCounter == 0 ) sound_start (ST_EFFECT, MACHINE1_SHORT, SL_2S, PRI_GAME_QUICK5); else if ( rollover_SoundCounter == 1 ) sound_start (ST_EFFECT, MACHINE1_MED, SL_2S, PRI_GAME_QUICK5); else if ( rollover_SoundCounter == 2 ) sound_start (ST_EFFECT, MACHINE1_LONG, SL_2S, PRI_GAME_QUICK5); task_sleep_sec (1); deff_exit (); }//end of mode_effect_deff