test/testspriteminimal.c
changeset 7539 f71285ee6cf9
parent 7517 965d57022c01
child 7639 9406b7dd2f2d
equal deleted inserted replaced
7538:1d187795e103 7539:f71285ee6cf9
    82     /* We're ready to roll. :) */
    82     /* We're ready to roll. :) */
    83     return (0);
    83     return (0);
    84 }
    84 }
    85 
    85 
    86 void
    86 void
    87 MoveSprites(SDL_Window * window, SDL_Renderer * renderer, SDL_Texture * sprite)
    87 MoveSprites(SDL_Renderer * renderer, SDL_Texture * sprite)
    88 {
    88 {
    89     int i;
    89     int i;
    90     int window_w = WINDOW_WIDTH;
    90     int window_w = WINDOW_WIDTH;
    91     int window_h = WINDOW_HEIGHT;
    91     int window_h = WINDOW_HEIGHT;
    92     SDL_Rect *position, *velocity;
    92     SDL_Rect *position, *velocity;
   156         while (SDL_PollEvent(&event)) {
   156         while (SDL_PollEvent(&event)) {
   157             if (event.type == SDL_QUIT || event.type == SDL_KEYDOWN) {
   157             if (event.type == SDL_QUIT || event.type == SDL_KEYDOWN) {
   158                 done = 1;
   158                 done = 1;
   159             }
   159             }
   160         }
   160         }
   161         MoveSprites(window, renderer, sprite);
   161         MoveSprites(renderer, sprite);
   162     }
   162     }
   163 
   163 
   164     quit(0);
   164     quit(0);
   165 
   165 
   166     return 0; /* to prevent compiler warning */
   166     return 0; /* to prevent compiler warning */