コード例 #1
0
ファイル: plugin.c プロジェクト: magcius/plymouth
static void
update_status (ply_boot_splash_plugin_t *plugin,
               const char               *status)
{
        assert (plugin != NULL);

        add_stars (plugin);
}
コード例 #2
0
ファイル: STARS.C プロジェクト: sickill/canvator
int main()
{
   clock_t t;
   long fr;

   for (int k=0; k<64000; k++) back[k] = back[k] / 7;

   srand(666);
   if (!add_stars()) { printf("err\n"); exit(1); }

	open_vid();
//   set_mode(0x13);
//   for (int i=0; i<256; i++) set_col(i, i/12, i/8, i/4);

   translate_object(stars, 0.0, 0.0, 2.0);

   fr = 0;
   t = clock();
	while (!ptc_console_key(console))
   {
//      memfill_d((long)screen, 16000, 0);
//      memcopy_d((long)back, (long)screen, 16000);
	memcpy(screen, back, 64000);
//      memset(screen, 0, 64000);
      rotate_object_local(stars);
      cast_object(stars);
      vis_object(stars);
      render_object(stars);
      alfa();
//      memcpy((char *)0xA0000, old_screen, 64000);
//      memcopy_d((long)old_screen, 0xA0000, 16000);
	show(old_screen);

      rotate_object(stars, 9, 9, 9);
      fr++;
   }
   t = clock() - t;
//   getch();

	close_vid();
//   set_mode(3);
   printf("f/s = %f\n", ((float)fr * CLOCKS_PER_SEC / (float)t));
   return 0;
}