Пример #1
0
void render() {
  rotation += (double)(ticks - SDL_GetTicks()) * 0.0000000001;
  ticks = SDL_GetTicks();
  
  if(ticks > 13200)
    glTranslated(0.f, 0.f, -70.f);
  else if(ticks > 11200)
    glTranslated(0.f, 0.f, -400.f+ticks/100.f+(ticks-11200)/10.0f);
  else if(ticks > 1000)
    glTranslated(0.f, 0.f, -400.f+ticks/100.f);
  else
    glTranslated(0.f, 0.f, -400.f);
  glPushMatrix();
  //printf("ticks %u\n", ticks);
  

  if(ticks < 13200){
    glRotated((6.28 / 16.) * 360. / 6.28, 1., 0., 0.);
    glRotated(rotation/2, 0., 1., 0.);
  }

  if(ticks < 13200)
    scene1();
  else
    scene2();
  glPopMatrix();
}
Пример #2
0
void loop()
{
  unsigned int abstime = millis() % timeline_cumsum[N_SCENES-1];

  for (int var = 0; var < N_SCENES; ++var) {
    if(timeline_cumsum[var] > abstime) {
      scene = var;
      break;
    }
  }

  if(scene == 0)
    scene_time = abstime;
  else
    scene_time = abstime - timeline_cumsum[scene-1];

/*
  // Debug: Show Scene
  LedSign::Set(0,0,0);
  LedSign::Set(1,0,0);
  LedSign::Set(2,0,0);
  LedSign::Set(scene,0,1);
*/

  switch(scene) {
    case 0: {
      scene0(scene_time);
      break;
    }

    case 1: {
      scene1(scene_time);
      break;
    }

    case 2: {
      scene2(scene_time);
      break;
    }
  }
 
}
Пример #3
0
Файл: bb.c Проект: stroucki/bb
int bb(void)
{
    aa_gotoxy(context, 0, 0);
    introscreen();
    params = aa_getrenderparams();
    aa_render(context, params, 0, 0, 1, 1);
    font = uncompressfont( /*context->params.font */ &aa_font16);
    scenetimer = tl_create_timer();
    srand(time(NULL));
    if (stage != 1)
	finish_stuff = 1;
    do
	switch (stage) {
	default:
	case 1:
	    load_song("bb.s3m");
	    bbupdate();
	    starttime = endtime = TIME;

	    scene1();
	    scene3();
	    if (quitnow)
		goto quit;
	    vezen(&fk1, &fk2, &fk3, &fk4);
	    messager("FILIP KUPSA known as FK, Tingle Notions, Dawn Music\n"
		"birth: June 22 1979, Tabor, Czech Republic, sex: male\n"
		     "\n"
	     "1992 - Changed his piano for 386/mp.com/pc-speaker music\n"
		     "1993 - Got his first Sound Blaster\n"
		     "1995 - Changed his SB for a new GUS technology\n"
		     "1996 - Composed his first great hits\n"
		     "1996 - FAT recomposition made by Windows 95\n"
		     "1997 - Released his musac in BB\n"
		     "\n"
		     "1998 - Got retired\n"
		     "\n"
		     "Contact address: via KT");
	    devezen2();
	    scene4();
	    scene2();
	    if (quitnow)
		goto quit;
	    vezen(&ms1, &ms2, &ms3, &ms4);
	    messager("MOJMIR SVOBODA known as MS, TiTania, MSS, Bill\n"
		     "birth: ??, Tabor, Czech Republic, sex: ? male ?\n"
		     "\n"
		     "1993 - Installed Linux on his 386sx/25 + 40MB HDD\n"
		     "1994 - Removed Linux to make space for Doom\n"
		   "1995 - Reinstalled Linux on his 486Dx4/120 + 850MB\n"
		     "1996 - Removed Linux to make space for Windows 95\n"
		     "\n"
		     "1997 - Removed Windows 95 to make space for aalib\n"
		     "\n"
		     "Contact address: [email protected]");
	    devezen3();
	    scene8();
	    scene6();
	case 2:
	    if (quitnow)
		goto quit;
	    vezen(&kt1, &kt2, &kt3, &kt4);
	    messager("KAMIL TOMAN known as KT, Kato, Whale, Bart\n"
		 "birth: May 19 1979, Tabor, Czech Republic, sex: male\n"
		     "\n"
		     "1993 - Became a linux extremist\n"
		     "1993 - Successful attempt to establish a secret organization\n"
		     "       Commandline Brotherhood\n"
		     "1995 - Action 'koules' - a secret project to train brotherhood\n"
		     "       members - covered under a game design\n"
		     "\n"
		 "1998 - Heading a new wave of command line revolution\n"
		     "\n"
		     "Contact address: [email protected]");
	    bbupdate();
	    starttime = endtime = TIME;
	    devezen1();
	    if (quitnow)
		goto quit;
	    scene7();
	    if (quitnow)
		goto quit;
	    scene5();
	    if (quitnow)
		goto quit;
	    scene10();
	    vezen(&hh1, &hh2, &hh3, &hh4);
	    messager("JAN HUBICKA known as HH, Jahusoft, HuJaSoft, JHS, UNIX, Honza\n"
		  "birth: Apr 1 1978, Tabor, Czech Republic, sex: male\n"
		     "\n"
		     "1991 - Installed underground hackers OS Linux\n"
		     "1995 - Headed Action 'koules'\n"
		     "1996 - Famous troan XaoS to convert all windows instalations\n"
		     "       into Linux\n"
		     "\n"
		     "1998 - Secret plan to make `Text Windows` system to confuse users\n"
		 "2001 - Planning an assassination of dictator Bill G.\n"
		     "\n"
		     "Contact address: [email protected]");
	    devezen4();
	    if (quitnow)
		goto quit;
	    credits();
	    if (quitnow)
		goto quit;
	case 3:
	    if (loopmode)
		break;
	    credits2();
	}
    while (loopmode);
  quit:;
    aa_close(context);
    return (0);
}