test/testsprite2.c
changeset 3685 64ce267332c6
parent 3596 f638ded38b8a
child 4596 dc26c37ad70e
     1.1 --- a/test/testsprite2.c	Thu Jan 21 05:49:41 2010 +0000
     1.2 +++ b/test/testsprite2.c	Thu Jan 21 06:21:52 2010 +0000
     1.3 @@ -11,7 +11,7 @@
     1.4  
     1.5  static CommonState *state;
     1.6  static int num_sprites;
     1.7 -static SDL_TextureID *sprites;
     1.8 +static SDL_Texture **sprites;
     1.9  static SDL_bool cycle_color;
    1.10  static SDL_bool cycle_alpha;
    1.11  static int cycle_direction = 1;
    1.12 @@ -98,7 +98,7 @@
    1.13  }
    1.14  
    1.15  void
    1.16 -MoveSprites(SDL_WindowID window, SDL_TextureID sprite)
    1.17 +MoveSprites(SDL_Window * window, SDL_Texture * sprite)
    1.18  {
    1.19      int i, n;
    1.20      int window_w, window_h;
    1.21 @@ -294,7 +294,7 @@
    1.22  
    1.23      /* Create the windows, initialize the renderers, and load the textures */
    1.24      sprites =
    1.25 -        (SDL_TextureID *) SDL_malloc(state->num_windows * sizeof(*sprites));
    1.26 +        (SDL_Texture **) SDL_malloc(state->num_windows * sizeof(*sprites));
    1.27      if (!sprites) {
    1.28          fprintf(stderr, "Out of memory!\n");
    1.29          quit(2);
    1.30 @@ -346,7 +346,7 @@
    1.31              case SDL_WINDOWEVENT:
    1.32                  switch (event.window.event) {
    1.33                  case SDL_WINDOWEVENT_EXPOSED:
    1.34 -                    SDL_SelectRenderer(event.window.windowID);
    1.35 +                    SDL_SelectRenderer(SDL_GetWindowFromID(event.window.windowID));
    1.36                      SDL_SetRenderDrawColor(0xA0, 0xA0, 0xA0, 0xFF);
    1.37                      SDL_RenderClear();
    1.38                      break;