test/testsprite2.c
changeset 1965 a788656ca29a
parent 1917 3f54b3ec5a07
child 1985 8055185ae4ed
     1.1 --- a/test/testsprite2.c	Thu Aug 03 19:34:05 2006 +0000
     1.2 +++ b/test/testsprite2.c	Sat Aug 05 17:09:42 2006 +0000
     1.3 @@ -16,8 +16,8 @@
     1.4  static SDL_Rect *positions;
     1.5  static SDL_Rect *velocities;
     1.6  static int sprite_w, sprite_h;
     1.7 -static SDL_TextureBlendMode blendMode = SDL_TextureBlendMode_Mask;
     1.8 -static SDL_TextureScaleMode scaleMode = SDL_TextureScaleMode_None;
     1.9 +static SDL_TextureBlendMode blendMode = SDL_TEXTUREBLENDMODE_MASK;
    1.10 +static SDL_TextureScaleMode scaleMode = SDL_TEXTURESCALEMODE_NONE;
    1.11  
    1.12  /* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */
    1.13  static void
    1.14 @@ -60,7 +60,7 @@
    1.15      for (i = 0; i < state->num_windows; ++i) {
    1.16          SDL_SelectRenderer(state->windows[i]);
    1.17          sprites[i] =
    1.18 -            SDL_CreateTextureFromSurface(0, SDL_TextureAccess_Remote, temp);
    1.19 +            SDL_CreateTextureFromSurface(0, SDL_TEXTUREACCESS_REMOTE, temp);
    1.20          if (!sprites[i]) {
    1.21              fprintf(stderr, "Couldn't create texture: %s\n", SDL_GetError());
    1.22              SDL_FreeSurface(temp);
    1.23 @@ -134,35 +134,35 @@
    1.24              if (SDL_strcasecmp(argv[i], "--blend") == 0) {
    1.25                  if (argv[i + 1]) {
    1.26                      if (SDL_strcasecmp(argv[i + 1], "none") == 0) {
    1.27 -                        blendMode = SDL_TextureBlendMode_None;
    1.28 +                        blendMode = SDL_TEXTUREBLENDMODE_NONE;
    1.29                          consumed = 2;
    1.30                      } else if (SDL_strcasecmp(argv[i + 1], "mask") == 0) {
    1.31 -                        blendMode = SDL_TextureBlendMode_Mask;
    1.32 +                        blendMode = SDL_TEXTUREBLENDMODE_MASK;
    1.33                          consumed = 2;
    1.34                      } else if (SDL_strcasecmp(argv[i + 1], "blend") == 0) {
    1.35 -                        blendMode = SDL_TextureBlendMode_Blend;
    1.36 +                        blendMode = SDL_TEXTUREBLENDMODE_BLEND;
    1.37                          consumed = 2;
    1.38                      } else if (SDL_strcasecmp(argv[i + 1], "add") == 0) {
    1.39 -                        blendMode = SDL_TextureBlendMode_Add;
    1.40 +                        blendMode = SDL_TEXTUREBLENDMODE_ADD;
    1.41                          consumed = 2;
    1.42                      } else if (SDL_strcasecmp(argv[i + 1], "mod") == 0) {
    1.43 -                        blendMode = SDL_TextureBlendMode_Mod;
    1.44 +                        blendMode = SDL_TEXTUREBLENDMODE_MOD;
    1.45                          consumed = 2;
    1.46                      }
    1.47                  }
    1.48              } else if (SDL_strcasecmp(argv[i], "--scale") == 0) {
    1.49                  if (argv[i + 1]) {
    1.50                      if (SDL_strcasecmp(argv[i + 1], "none") == 0) {
    1.51 -                        scaleMode = SDL_TextureScaleMode_None;
    1.52 +                        scaleMode = SDL_TEXTURESCALEMODE_NONE;
    1.53                          consumed = 2;
    1.54                      } else if (SDL_strcasecmp(argv[i + 1], "fast") == 0) {
    1.55 -                        scaleMode = SDL_TextureScaleMode_Fast;
    1.56 +                        scaleMode = SDL_TEXTURESCALEMODE_FAST;
    1.57                          consumed = 2;
    1.58                      } else if (SDL_strcasecmp(argv[i + 1], "slow") == 0) {
    1.59 -                        scaleMode = SDL_TextureScaleMode_Slow;
    1.60 +                        scaleMode = SDL_TEXTURESCALEMODE_SLOW;
    1.61                          consumed = 2;
    1.62                      } else if (SDL_strcasecmp(argv[i + 1], "best") == 0) {
    1.63 -                        scaleMode = SDL_TextureScaleMode_Best;
    1.64 +                        scaleMode = SDL_TEXTURESCALEMODE_BEST;
    1.65                          consumed = 2;
    1.66                      }
    1.67                  }
    1.68 @@ -206,7 +206,7 @@
    1.69          quit(2);
    1.70      }
    1.71      srand(time(NULL));
    1.72 -    if (scaleMode != SDL_TextureScaleMode_None) {
    1.73 +    if (scaleMode != SDL_TEXTURESCALEMODE_NONE) {
    1.74          sprite_w += sprite_w / 2;
    1.75          sprite_h += sprite_h / 2;
    1.76      }