void prison_break_start_effect_deff(void) { U8 prison_break_MessageCounter; prison_break_MessageCounter = random_scaled(2); dmd_clean_page_high ();// dmd_clean_page_low ();// switch (prison_break_MessageCounter) { default: case 0: prison_break_animation_display_effect (IMG_CHIEF_EARLE2_START, IMG_CHIEF_EARLE2_END); prison_break_frame_bitfade_fast(IMG_JAIL_BREAK_START); prison_break_animation_display_effect (IMG_JAIL_BREAK_START, IMG_JAIL_BREAK_END); prison_break_frame_bitfade_fast(IMG_ASSOC_BOB_START); prison_break_animation_display_effect (IMG_ASSOC_BOB_START, IMG_ASSOC_BOB_END); frame_with_words_display_v5prc_effect (IMG_ASSOC_BOB_END, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "BREAKOUT"); break; case 1: prison_break_animation_display_effect (IMG_ASSOC_BOB_START, IMG_ASSOC_BOB_END); prison_break_frame_bitfade_fast(IMG_PRISON_BREAKOUT_B_START); prison_break_animation_display_effect (IMG_PRISON_BREAKOUT_B_START, IMG_PRISON_BREAKOUT_B_MID); prison_break_animation_display_effect (IMG_PRISON_BREAKOUT_B_MID, IMG_PRISON_BREAKOUT_B_END); prison_break_frame_bitfade_fast(IMG_CHIEF_EARLE2_START); prison_break_animation_display_effect (IMG_CHIEF_EARLE2_START, IMG_CHIEF_EARLE2_END); frame_with_words_display_v5prc_effect (IMG_CHIEF_EARLE2_END, DMD_MIDDLE_X, DMD_BIG_CY_Top, "PRISON"); frame_with_words_display_v5prc_effect (IMG_CHIEF_EARLE2_END, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "BREAK"); break; }//end of switch task_sleep_sec (2); deff_exit (); }//end of mode_effect_deff
/** * Initialize the DMD subsystem. */ void dmd_init (void) { //dmd_rtt = dmd_rtt0; dmd_rtt = dmd_new_rtt; dmd_phase_ptr = dmd_phase_table; dmd_in_transition = FALSE; dmd_transition = NULL; /* If DMD_BLANK_PAGE_COUNT is defined, this says how * many DMD pages should not be allocatable, but should be * reserved and kept blank. This is handy for some effects. * Initialize those pages now. */ #ifdef DMD_BLANK_PAGE_COUNT pinio_dmd_window_set (PINIO_DMD_WINDOW_0, dmd_get_blank (0)); dmd_clean_page_low (); pinio_dmd_window_set (PINIO_DMD_WINDOW_1, dmd_get_blank (1)); dmd_clean_page_high (); #endif pinio_dmd_window_set (PINIO_DMD_WINDOW_0, 0); pinio_dmd_window_set (PINIO_DMD_WINDOW_1, 0); dmd_clean_page_low (); pinio_dmd_set_visible (dmd_dark_page = dmd_bright_page = 0); dmd_free_page = 2; /* Program the DMD controller to generate interrupts */ pinio_dmd_request_interrupt (); }
void huxley_hit_effect_deff(void) { if (DM_IN_DMD_TEST) { if (++huxley_MessageCounter > 3) huxley_MessageCounter = 0; } else huxley_MessageCounter = random_scaled(4); dmd_clean_page_high ();// dmd_clean_page_low ();// task_create_gid1 (GID_HUXLEY_HIT_SOUND, huxley_hit_sounds_task); switch (huxley_MessageCounter) { default: case 0: // huxley_animation_display_effect (IMG_HUXLEY_A_START, IMG_HUXLEY_A_END); huxley_frame_with_words_display_fipps_effect (IMG_HUXLEY_A_END, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "1 MILLION"); break; case 1: // huxley_animation_display_effect (IMG_HUXLEY_B1_START, IMG_HUXLEY_B1_END); huxley_frame_with_words_display_fipps_effect (IMG_HUXLEY_B1_END, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "HUXLEY"); break; case 2: // huxley_animation_display_effect (IMG_HUXLEY_B2_START, IMG_HUXLEY_B2_END); huxley_frame_with_words_display_fipps_effect (IMG_HUXLEY_B2_END, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "1 MILLION"); break; case 3: // huxley_animation_display_effect (IMG_HUXLEY_D_START, IMG_HUXLEY_D_END); huxley_frame_with_words_display_fipps_effect (IMG_HUXLEY_D_END, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "HUXLEY"); break; }//end of switch task_sleep (TIME_500MS); deff_exit (); }//end of mode_effect_deff
void huxley_hit_effect_deff(void) { U8 huxley_MessageCounter; huxley_MessageCounter = random_scaled(5); dmd_clean_page_high ();// dmd_clean_page_low ();// task_create_gid1 (GID_HUXLEY_HIT_SOUND, huxley_hit_sounds_task); switch (huxley_MessageCounter) { default: case 0: huxley_animation_display_effect (IMG_HUXLEY_A_START, IMG_HUXLEY_A_END); huxley_frame_with_words_display_fipps_effect (IMG_HUXLEY_A_END, DMD_MIDDLE_X - 30, DMD_BIG_CY_Bot, "1 MILLION"); break; case 1: huxley_animation_display_effect (IMG_HUXLEY_B1_START, IMG_HUXLEY_B1_END); huxley_frame_with_words_display_fipps_effect (IMG_HUXLEY_B1_END, DMD_MIDDLE_X - 30, DMD_BIG_CY_Bot, "HUXLEY"); break; case 2: huxley_animation_display_effect (IMG_HUXLEY_B2_START, IMG_HUXLEY_B2_END); huxley_frame_with_words_display_fipps_effect (IMG_HUXLEY_B2_END, DMD_MIDDLE_X - 30, DMD_BIG_CY_Bot, "1 MILLION"); break; case 3: huxley_animation_display_effect (IMG_HUXLEY_D_START, IMG_HUXLEY_D_END); huxley_frame_with_words_display_fipps_effect (IMG_HUXLEY_D_END, DMD_MIDDLE_X + 30, DMD_BIG_CY_Bot, "HUXLEY"); break; case 4: huxley_animation_display_effect (IMG_HUXLEY_E_START, IMG_HUXLEY_E_END); huxley_frame_with_words_display_fipps_effect (IMG_HUXLEY_E_END, DMD_MIDDLE_X - 30, DMD_BIG_CY_Bot, "HUXLEY"); break; }//end of switch task_sleep_sec (1); deff_exit (); }//end of mode_effect_deff
void cryoprison_jackpot_effect_deff(void) { // if (++cryoprison_jackpot_MessageCounter > 3) cryoprison_jackpot_MessageCounter = 0; cryoprison_jackpot_MessageCounter = random_scaled(4); dmd_clean_page_high ();// dmd_clean_page_low ();// task_create_gid1 (GID_CRYOPRISON_JACKPOT_SOUND, cryoprison_jackpot_sounds_task); switch (cryoprison_jackpot_MessageCounter) { default: case 0: cryoprison_animation_display_effect (IMG_CAPSIMON_C_START, IMG_CAPSIMON_C_END); cryoprison_frame_with_words_display_steel_effect (IMG_CAPSIMON_C_END, DMD_MIDDLE_X - 20, DMD_BIG_CY_Bot, "JACKPOT"); break; case 1: cryoprison_animation_display_effect (IMG_CRYOPRISON_E2_START, IMG_CRYOPRISON_E2_END); cryoprison_frame_with_words_display_steel_effect (IMG_CRYOPRISON_E2_END, DMD_MIDDLE_X - 20, DMD_BIG_CY_Bot, "JACKPOT"); break; case 2: cryoprison_animation_display_effect (IMG_CRYOPRISON_E1_START, IMG_CRYOPRISON_E1_END); cryoprison_frame_with_words_display_steel_effect (IMG_CRYOPRISON_E1_END, DMD_MIDDLE_X - 20, DMD_BIG_CY_Bot, "JACKPOT"); break; case 3: cryoprison_animation_display_effect (IMG_DR_COCTEAU_B_START, IMG_DR_COCTEAU_B_END); cryoprison_frame_with_words_display_steel_effect (IMG_DR_COCTEAU_B_END, DMD_MIDDLE_X - 20, DMD_BIG_CY_Bot, "JACKPOT"); break; }//end of switch task_sleep_sec (1); deff_exit (); }//end of mode_effect_deff
/** * Initialize the DMD subsystem. */ void dmd_init (void) { //dmd_rtt = dmd_rtt0; dmd_rtt = dmd_new_rtt; dmd_phase_ptr = dmd_phase_table; dmd_in_transition = FALSE; dmd_transition = NULL; /* If DMD_BLANK_PAGE_COUNT is defined, this says how * many DMD pages should not be allocatable, but should be * reserved and kept blank. This is handy for some effects. * Initialize those pages now. */ #ifdef DMD_BLANK_PAGE_COUNT wpc_dmd_set_low_page (dmd_get_blank (0)); dmd_clean_page_low (); wpc_dmd_set_high_page (dmd_get_blank (1)); dmd_clean_page_high (); #endif wpc_dmd_set_low_page (0); wpc_dmd_set_high_page (0); dmd_clean_page_low (); wpc_dmd_set_visible_page (dmd_dark_page = dmd_bright_page = 0); dmd_free_page = 2; /* Program the DMD controller to generate interrupts */ #ifdef CONFIG_DEBUG_ADJUSTMENTS firq_row_value = DMD_REFRESH_ROW; #endif dmd_request_firq (); }
/**************************************************************************** * * DISPLAY EFFECTS * ****************************************************************************/ void eject_effect_deff(void) { U16 fno; dmd_clean_page_high ();// dmd_clean_page_low ();// switch (++ejectDeffCounter % 2) { default: case 0: for (fno = IMG_EYE_B_START; fno <= IMG_EYE_B_END; fno += 2) { dmd_alloc_pair (); frame_draw(fno); dmd_show2 (); task_sleep (TIME_66MS); }//end of inner loop for (fno = IMG_EYE_B_END - 2; fno >= IMG_EYE_B_START + 6; fno -= 2) { dmd_alloc_pair (); frame_draw(fno); dmd_show2 (); task_sleep (TIME_66MS); }//end of inner loop for (fno = IMG_EYE_B_START + 4; fno >= IMG_EYE_B_START + 2; fno -= 2) { dmd_map_overlay (); dmd_clean_page_low (); font_render_string_center (&font_halobold12, DMD_MIDDLE_X, DMD_BIG_CY_Top, "RETINA"); font_render_string_center (&font_halobold12, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "SCAN"); dmd_text_outline (); dmd_alloc_pair (); frame_draw(fno); dmd_overlay_outline (); dmd_show2 (); task_sleep (TIME_66MS); }//end of inner loop break; case 1: for (fno = IMG_EYE_START; fno <= IMG_EYE_27; fno += 2) { dmd_alloc_pair (); frame_draw(fno); dmd_show2 (); task_sleep (TIME_66MS); }//end of inner loop dmd_alloc_pair_clean ();// Clean both pages for (fno = IMG_EYE_28; fno <= IMG_EYE_END; fno += 2) { dmd_map_overlay (); dmd_clean_page_low (); font_render_string_center (&font_halobold12, DMD_MIDDLE_X, DMD_BIG_CY_Top, "RETINA"); font_render_string_center (&font_halobold12, DMD_MIDDLE_X, DMD_BIG_CY_Bot, "SCAN"); dmd_text_outline (); dmd_alloc_pair (); frame_draw(fno); dmd_overlay_outline (); dmd_show2 (); task_sleep (TIME_66MS); }//end of inner loop break; }//end of switch deff_exit (); }//end of mode_effect_deff
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
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 (); }
/** * Scroll two cars, one after the other, from left to right. * * Note: Car graphics use a white background. */ void corvette_amode_scroll_two_cars( void ) { dmd_alloc_pair(); dmd_clean_page_high(); dmd_clean_page_low(); dmd_invert_page (dmd_low_buffer); dmd_invert_page (dmd_high_buffer); dmd_show2(); task_sleep_sec(1); dmd_alloc_pair(); frame_draw (IMG_CORVETTE_1979); dmd_sched_transition (&trans_scroll_right); dmd_show2 (); dmd_alloc_pair(); dmd_clean_page_high(); dmd_clean_page_low(); dmd_invert_page (dmd_low_buffer); dmd_invert_page (dmd_high_buffer); dmd_sched_transition (&trans_scroll_right); dmd_show2(); task_sleep_sec(1); dmd_alloc_pair(); frame_draw (IMG_CORVETTE_1986); dmd_sched_transition (&trans_scroll_right); dmd_show2 (); dmd_alloc_pair(); dmd_clean_page_high(); dmd_clean_page_low(); dmd_invert_page (dmd_low_buffer); dmd_invert_page (dmd_high_buffer); dmd_sched_transition (&trans_scroll_right); dmd_show2(); task_sleep_sec(1); }
void show_random_factoid (void) { dmd_map_overlay (); dmd_clean_page_high (); dmd_clean_page_low (); font_render_string_center (&font_bitoutline, 64, 8, "RANDOM"); font_render_string_center (&font_bitoutline, 64, 20, "FACTOID"); show_text_on_stars (); dmd_alloc_low_clean (); factoid_msg(random_scaled(NUM_FACTOIDS)); dmd_show_low (); amode_sleep_sec (6); }
static void diag_message_flash (void) { U8 n; dmd_clean_page_high (); for (n = 0; n < 5; n++) { task_sleep (TIME_200MS); dmd_show_high (); task_sleep (TIME_100MS); dmd_show_low (); sound_send (SND_TEST_ALERT); } task_sleep_sec (1); barrier (); }
CALLSET_ENTRY (master, amode_page) { if (amode_show_scores_long) return; dmd_sched_transition (&trans_vstripe_left2right); dmd_map_overlay (); dmd_clean_page_high (); dmd_clean_page_low (); //sprintf ("LOOP MASTER: %s %d LOOPS", loop_master_initials, loop_master_hi); psprintf ("LOOP MASTER: %d LOOP", "LOOP MASTER: %d LOOPS", loop_master_hi); font_render_string_center (&font_var5, 64, 10, sprintf_buffer); //sprintf ("COMBO MASTER: %s %d COMBOS", combo_master_initials, combo_master_hi); psprintf ("COMBO MASTER: %d COMBO", "COMBO MASTER: %d COMBOS", combo_master_hi); font_render_string_center (&font_var5, 64, 20, sprintf_buffer); show_text_on_stars (); }
CALLSET_ENTRY (deffs2, amode_page) { if (amode_show_scores_long) return; extern U8 hour; dmd_map_overlay (); dmd_clean_page_high (); dmd_clean_page_low (); if (hour < 12) sprintf ("GOOD MORNING"); else if (hour < 18) sprintf ("GOOD AFTERNOON"); else if (hour < 21) sprintf ("GOOD EVENING"); else sprintf ("THE TWILIGHT HOUR"); font_render_string_center (&font_nayupixel10, 64, 16, sprintf_buffer); show_text_on_stars (); }
static void map_and_clean (void) { dmd_map_overlay (); dmd_clean_page_high (); dmd_clean_page_low (); }