comparison src/video/sdlgenblit.pl @ 1992:7387e0514595

Take advantage of the existing SDL blitters for normal copy blits.
author Sam Lantinga <slouken@libsdl.org>
date Tue, 29 Aug 2006 08:24:16 +0000
parents 5b5f5de5433f
children bee005ace1bf
comparison
equal deleted inserted replaced
1991:3863ba81c1d6 1992:7387e0514595
396 my $src = shift; 396 my $src = shift;
397 my $dst = shift; 397 my $dst = shift;
398 for (my $modulate = 0; $modulate <= 1; ++$modulate) { 398 for (my $modulate = 0; $modulate <= 1; ++$modulate) {
399 for (my $blend = 0; $blend <= 1; ++$blend) { 399 for (my $blend = 0; $blend <= 1; ++$blend) {
400 for (my $scale = 0; $scale <= 1; ++$scale) { 400 for (my $scale = 0; $scale <= 1; ++$scale) {
401 if ( $modulate != 0 || $blend != 0 || $scale != 0 || $src ne $dst ) { 401 if ( $modulate || $blend || $scale ) {
402 output_copyfuncname("extern int SDLCALL", $src, $dst, $modulate, $blend, $scale, 1, ";\n"); 402 output_copyfuncname("extern int SDLCALL", $src, $dst, $modulate, $blend, $scale, 1, ";\n");
403 } 403 }
404 } 404 }
405 } 405 }
406 } 406 }
432 for (my $j = 0; $j <= $#dst_formats; ++$j) { 432 for (my $j = 0; $j <= $#dst_formats; ++$j) {
433 my $dst = $dst_formats[$j]; 433 my $dst = $dst_formats[$j];
434 for (my $modulate = 0; $modulate <= 1; ++$modulate) { 434 for (my $modulate = 0; $modulate <= 1; ++$modulate) {
435 for (my $blend = 0; $blend <= 1; ++$blend) { 435 for (my $blend = 0; $blend <= 1; ++$blend) {
436 for (my $scale = 0; $scale <= 1; ++$scale) { 436 for (my $scale = 0; $scale <= 1; ++$scale) {
437 if ( $modulate != 0 || $blend != 0 || $scale != 0 || $src ne $dst ) { 437 if ( $modulate || $blend || $scale ) {
438 print FILE " { SDL_PIXELFORMAT_$src, SDL_PIXELFORMAT_$dst, "; 438 print FILE " { SDL_PIXELFORMAT_$src, SDL_PIXELFORMAT_$dst, ";
439 if ( $modulate ) { 439 if ( $modulate ) {
440 print FILE "(SDL_TEXTUREMODULATE_COLOR | SDL_TEXTUREMODULATE_ALPHA), "; 440 print FILE "(SDL_TEXTUREMODULATE_COLOR | SDL_TEXTUREMODULATE_ALPHA), ";
441 } else { 441 } else {
442 print FILE "0, "; 442 print FILE "0, ";
495 my $dst = shift; 495 my $dst = shift;
496 496
497 for (my $modulate = 0; $modulate <= 1; ++$modulate) { 497 for (my $modulate = 0; $modulate <= 1; ++$modulate) {
498 for (my $blend = 0; $blend <= 1; ++$blend) { 498 for (my $blend = 0; $blend <= 1; ++$blend) {
499 for (my $scale = 0; $scale <= 1; ++$scale) { 499 for (my $scale = 0; $scale <= 1; ++$scale) {
500 if ( $modulate != 0 || $blend != 0 || $scale != 0 || $src ne $dst ) { 500 if ( $modulate || $blend || $scale ) {
501 output_copyfunc($src, $dst, $modulate, $blend, $scale); 501 output_copyfunc($src, $dst, $modulate, $blend, $scale);
502 } 502 }
503 } 503 }
504 } 504 }
505 } 505 }