comparison krapula.c @ 49:333d9075f5ea

Add some comments.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 01 Mar 2015 18:52:04 +0200
parents 25a12fb58c19
children 8c65e57cc81a
comparison
equal deleted inserted replaced
48:da89ff617886 49:333d9075f5ea
417 { 417 {
418 float t = engineGetTimeDT(engine); 418 float t = engineGetTimeDT(engine);
419 419
420 if (t < 5) 420 if (t < 5)
421 { 421 {
422 //
423 // Anciat prodz logo
424 //
422 int dt = engineGetTime(engine, 0); 425 int dt = engineGetTime(engine, 0);
423 static SDL_Surface *anciat; 426 static SDL_Surface *anciat;
424 static DMLerpContext lerpX, lerpY, lerpD; 427 static DMLerpContext lerpX, lerpY, lerpD;
425 static DMScaledBlitFunc nblit; 428 static DMScaledBlitFunc nblit;
426 DMVector light; 429 DMVector light;
444 nblit(bmap, 0, 0, engine->screen->w, engine->screen->h, engine->screen); 447 nblit(bmap, 0, 0, engine->screen->w, engine->screen->h, engine->screen);
445 } 448 }
446 else 449 else
447 if (t < 10) 450 if (t < 10)
448 { 451 {
452 //
453 // Demo "logo" texts
454 //
449 int dt = engineGetTime(engine, 5); 455 int dt = engineGetTime(engine, 5);
450 static SDL_Surface *logobg, *logolayer1, *logolayer2; 456 static SDL_Surface *logobg, *logolayer1, *logolayer2;
451 static DMScaledBlitFunc nblit, kblit; 457 static DMScaledBlitFunc nblit, kblit;
452 static DMLerpContext lerpD; 458 static DMLerpContext lerpD;
453 static BOOL nollattu = FALSE; 459 static BOOL nollattu = FALSE;
478 nblit(logolayer2, -x2, -y2, engine->screen->w+w2, engine->screen->h+h2, engine->screen); 484 nblit(logolayer2, -x2, -y2, engine->screen->w+w2, engine->screen->h+h2, engine->screen);
479 } 485 }
480 else 486 else
481 if (t < 20) 487 if (t < 20)
482 { 488 {
489 //
490 // "Gaytracing"
491 //
483 int dt = engineGetTime(engine, 10); 492 int dt = engineGetTime(engine, 10);
484 static SDL_Surface *gay, *logobg; 493 static SDL_Surface *gay, *logobg;
485 static DMLerpContext lerpX, lerpY, lerpD; 494 static DMLerpContext lerpX, lerpY, lerpD;
486 static DMScaledBlitFunc nblit, kblit; 495 static DMScaledBlitFunc nblit, kblit;
487 static BOOL nollattu = FALSE; 496 static BOOL nollattu = FALSE;
517 } 526 }
518 } 527 }
519 else 528 else
520 if (t < 45) 529 if (t < 45)
521 { 530 {
531 //
532 // Nosfe video/animation + credits
533 //
522 static SDL_Surface *ruutu; 534 static SDL_Surface *ruutu;
523 static int currState, currCredit, creditStartTime; 535 static int currState, currCredit, creditStartTime;
524 static DMLerpContext lerpX, lerpY, lerpZ; 536 static DMLerpContext lerpX, lerpY, lerpZ;
525 static DMScaledBlitFunc nblit, kblit; 537 static DMScaledBlitFunc nblit, kblit;
526 static BOOL stateChange, nollattu = FALSE; 538 static BOOL stateChange, nollattu = FALSE;
619 631
620 } 632 }
621 else 633 else
622 if (t < 60) 634 if (t < 60)
623 { 635 {
636 //
637 // Greetings
638 //
624 int dt = engineGetTime(engine, 45); 639 int dt = engineGetTime(engine, 45);
625 static SDL_Surface *logobg, *greets; 640 static SDL_Surface *logobg, *greets;
626 static DMScaledBlitFunc nblit, kblit; 641 static DMScaledBlitFunc nblit, kblit;
627 static DMLerpContext lerpD; 642 static DMLerpContext lerpD;
628 static BOOL nollattu = FALSE; 643 static BOOL nollattu = FALSE;
648 } 663 }
649 else 664 else
650 engine->exitFlag = TRUE; 665 engine->exitFlag = TRUE;
651 666
652 667
668 //
669 // Flash/fade thingy
670 //
653 { 671 {
654 static SDL_Surface *feidi; 672 static SDL_Surface *feidi;
655 static int fadeStartTime; 673 static int fadeStartTime;
656 static BOOL fadeActive, nollattu = FALSE; 674 static BOOL fadeActive, nollattu = FALSE;
657 static DMLerpContext fadeLerp; 675 static DMLerpContext fadeLerp;