void test_log(){ log_handler = flog_create("test_log.log"); FTU_ASSERT_EXPRESS(log_handler >= 0); _test_log(); sleep(2); }
static void test_single_async(int num) { log_mode = FLOG_ASYNC_MODE; log_handler = flog_create("benchmark/flog/logs/async_single_thread.log", log_mode); printf("[ASYNC]start single testing...\n"); do_test(num, 1); sleep(2); printf("[ASYNC]end single testing\n\n"); flog_destroy(log_handler); }
static void test_multi_async(int num, int thread_num) { log_mode = FLOG_ASYNC_MODE; log_handler = flog_create("benchmark/flog/logs/async_multithread.log", log_mode); printf("[ASYNC]start multip testing ( totally, we start %d threads for testing)...\n", thread_num); do_test(num, thread_num); sleep(6); printf("[ASYNC]end multip testing\n\n"); flog_destroy(log_handler); }
/* ----------------------------------------------------------------------------------- */ void ending_main(){ int8u actor_no; int8u scene_counter; char *text; int8u text_row; int8u c; actors_clear(); actor_no = ENDING_ACTOR_START; scene_counter = 1; text = ending_text; scroll_y = 0; /* clear bottom 4 rows */ print_init(); for(c = 24; c < 28; c++){ vsync_wait(); store_pattern_name_buffer(c); } psg_set_bgm(fopen("sound/summer.sn7"), TRUE); while(373){ sprites_clear(); port_read(); /* generate text */ text_row = scroll_y >> 3; text_row--; scene_counter--; if(scene_counter == 0){ scene_counter = 255; text_row--; c = print(text, 4); if(c < 2) break; text += c; }else{ print_init(); } /* actors */ if(scene_counter == 1){ if(actor_no <= ENDING_ACTOR_END){ switch(actor_no){ case ACTOR_PLAYER: player_create(0); actors_speed_y[0] = 32 - 32; break; case ACTOR_NINJA: ninja_create(0); break; case ACTOR_NINJA_CAKE: actors_type[0] = ACTOR_NINJA_CAKE; break; case ACTOR_BOAR: boar_create(0); break; case ACTOR_DARUMA: daruma_create(0); break; case ACTOR_TENGU: tengu_create(0); break; case ACTOR_HIME: hime_create(0); break; case ACTOR_BIRD: bird_create(0); break; case ACTOR_FLOG: flog_create(0); break; case ACTOR_GOAST: goast_create(0); actors_y[0] = 192; actors_x[0] = 250; break; case ACTOR_NASU: nasu_create(0); break; } }else{ actors_type[0] = ACTOR_NULL; } actor_no++; } /* scroll */ if(frame_count & 0x01){ scroll_y++; if(scroll_y > 224){ scroll_y = 0; } } /* updates */ actors_update(); vsync_wait(); sprites_store(); store_pattern_name_buffer(text_row); scroll_store(); psg_play(); frame_count++; } psg_stop(); }