test/testshape.c
changeset 7191 75360622e65f
parent 5535 96594ac5fd1a
child 7478 0d02f6a323f5
     1.1 --- a/test/testshape.c	Sat May 18 12:48:50 2013 -0700
     1.2 +++ b/test/testshape.c	Sat May 18 14:17:52 2013 -0700
     1.3 @@ -32,10 +32,10 @@
     1.4      //Clear render-target to blue.
     1.5      SDL_SetRenderDrawColor(renderer,0x00,0x00,0xff,0xff);
     1.6      SDL_RenderClear(renderer);
     1.7 -    
     1.8 +
     1.9      //Render the texture.
    1.10      SDL_RenderCopy(renderer,texture,&texture_dimensions,&texture_dimensions);
    1.11 -    
    1.12 +
    1.13      SDL_RenderPresent(renderer);
    1.14  }
    1.15  
    1.16 @@ -72,12 +72,12 @@
    1.17          printf("SDL_Shape requires at least one bitmap file as argument.\n");
    1.18          exit(-1);
    1.19      }
    1.20 -    
    1.21 +
    1.22      if(SDL_VideoInit(NULL) == -1) {
    1.23          printf("Could not initialize SDL video.\n");
    1.24          exit(-2);
    1.25      }
    1.26 -    
    1.27 +
    1.28      num_pictures = argc - 1;
    1.29      pictures = (LoadedPicture *)malloc(sizeof(LoadedPicture)*num_pictures);
    1.30      for(i=0;i<num_pictures;i++)
    1.31 @@ -105,7 +105,7 @@
    1.32              pictures[i].mode.parameters.colorKey = black;
    1.33          }
    1.34      }
    1.35 -    
    1.36 +
    1.37      window = SDL_CreateShapedWindow("SDL_Shape test",SHAPED_WINDOW_X,SHAPED_WINDOW_Y,SHAPED_WINDOW_DIMENSION,SHAPED_WINDOW_DIMENSION,SDL_WINDOW_RESIZABLE | SDL_WINDOW_SHOWN);
    1.38      if(window == NULL) {
    1.39          for(i=0;i<num_pictures;i++)
    1.40 @@ -125,7 +125,7 @@
    1.41          printf("Could not create rendering context for SDL_Shape window.\n");
    1.42          exit(-5);
    1.43      }
    1.44 -    
    1.45 +
    1.46      for(i=0;i<num_pictures;i++)
    1.47          pictures[i].texture = NULL;
    1.48      for(i=0;i<num_pictures;i++) {
    1.49 @@ -145,7 +145,7 @@
    1.50              exit(-6);
    1.51          }
    1.52      }
    1.53 -    
    1.54 +
    1.55      event_pending = 0;
    1.56      should_exit = 0;
    1.57      event_pending = SDL_PollEvent(&event);
    1.58 @@ -184,7 +184,7 @@
    1.59          SDL_Delay(time_left());
    1.60          next_time += TICK_INTERVAL;
    1.61      }
    1.62 -    
    1.63 +
    1.64      //Free the textures.
    1.65      for(i=0;i<num_pictures;i++)
    1.66          SDL_DestroyTexture(pictures[i].texture);