test/testsprite2.c
changeset 5138 da10636e5eca
parent 4929 aa8888658021
child 5140 e743b9c3f6d6
     1.1 --- a/test/testsprite2.c	Mon Jan 31 22:21:29 2011 -0800
     1.2 +++ b/test/testsprite2.c	Mon Jan 31 22:44:43 2011 -0800
     1.3 @@ -21,7 +21,6 @@
     1.4  static SDL_Rect *velocities;
     1.5  static int sprite_w, sprite_h;
     1.6  static SDL_BlendMode blendMode = SDL_BLENDMODE_MASK;
     1.7 -static SDL_ScaleMode scaleMode = SDL_SCALEMODE_NONE;
     1.8  
     1.9  /* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */
    1.10  static void
    1.11 @@ -89,7 +88,6 @@
    1.12              return (-1);
    1.13          }
    1.14          SDL_SetTextureBlendMode(sprites[i], blendMode);
    1.15 -        SDL_SetTextureScaleMode(sprites[i], scaleMode);
    1.16      }
    1.17      SDL_FreeSurface(temp);
    1.18  
    1.19 @@ -253,22 +251,6 @@
    1.20                          consumed = 2;
    1.21                      }
    1.22                  }
    1.23 -            } else if (SDL_strcasecmp(argv[i], "--scale") == 0) {
    1.24 -                if (argv[i + 1]) {
    1.25 -                    if (SDL_strcasecmp(argv[i + 1], "none") == 0) {
    1.26 -                        scaleMode = SDL_SCALEMODE_NONE;
    1.27 -                        consumed = 2;
    1.28 -                    } else if (SDL_strcasecmp(argv[i + 1], "fast") == 0) {
    1.29 -                        scaleMode = SDL_SCALEMODE_FAST;
    1.30 -                        consumed = 2;
    1.31 -                    } else if (SDL_strcasecmp(argv[i + 1], "slow") == 0) {
    1.32 -                        scaleMode = SDL_SCALEMODE_SLOW;
    1.33 -                        consumed = 2;
    1.34 -                    } else if (SDL_strcasecmp(argv[i + 1], "best") == 0) {
    1.35 -                        scaleMode = SDL_SCALEMODE_BEST;
    1.36 -                        consumed = 2;
    1.37 -                    }
    1.38 -                }
    1.39              } else if (SDL_strcasecmp(argv[i], "--cyclecolor") == 0) {
    1.40                  cycle_color = SDL_TRUE;
    1.41                  consumed = 1;
    1.42 @@ -282,7 +264,7 @@
    1.43          }
    1.44          if (consumed < 0) {
    1.45              fprintf(stderr,
    1.46 -                    "Usage: %s %s [--blend none|mask|blend|add|mod] [--scale none|fast|slow|best] [--cyclecolor] [--cyclealpha]\n",
    1.47 +                    "Usage: %s %s [--blend none|mask|blend|add|mod] [--cyclecolor] [--cyclealpha]\n",
    1.48                      argv[0], CommonUsage(state));
    1.49              quit(1);
    1.50          }
    1.51 @@ -316,10 +298,6 @@
    1.52          quit(2);
    1.53      }
    1.54      srand((unsigned int)time(NULL));
    1.55 -    if (scaleMode != SDL_SCALEMODE_NONE) {
    1.56 -        sprite_w += sprite_w / 2;
    1.57 -        sprite_h += sprite_h / 2;
    1.58 -    }
    1.59      for (i = 0; i < num_sprites; ++i) {
    1.60          positions[i].x = rand() % (state->window_w - sprite_w);
    1.61          positions[i].y = rand() % (state->window_h - sprite_h);