Xcode-iOS/Template/SDL iOS Application/main.c
changeset 10943 729e39fc0175
parent 7497 109f37bca7cc
     1.1 --- a/Xcode-iOS/Template/SDL iOS Application/main.c	Sun Mar 19 22:16:37 2017 +0100
     1.2 +++ b/Xcode-iOS/Template/SDL iOS Application/main.c	Sun Mar 19 22:17:01 2017 +0100
     1.3 @@ -5,6 +5,8 @@
     1.4   */
     1.5  
     1.6  #include "SDL.h"
     1.7 +#include <stdio.h>
     1.8 +#include <stdlib.h>
     1.9  #include <time.h>
    1.10  
    1.11  #define SCREEN_WIDTH 320
    1.12 @@ -20,6 +22,7 @@
    1.13  render(SDL_Renderer *renderer)
    1.14  {
    1.15  
    1.16 +    SDL_Rect rect;
    1.17      Uint8 r, g, b;
    1.18  
    1.19      /* Clear the screen */
    1.20 @@ -27,7 +30,6 @@
    1.21      SDL_RenderClear(renderer);
    1.22  
    1.23      /*  Come up with a random rectangle */
    1.24 -    SDL_Rect rect;
    1.25      rect.w = randomInt(64, 128);
    1.26      rect.h = randomInt(64, 128);
    1.27      rect.x = randomInt(0, SCREEN_WIDTH);