test/testsprite2.c
changeset 4601 cd2523c69d3e
parent 4598 66e13a224bd6
child 4884 27ab20a36eba
equal deleted inserted replaced
4600:8b22d33d8260 4601:cd2523c69d3e
    18 static int current_alpha = 0;
    18 static int current_alpha = 0;
    19 static int current_color = 0;
    19 static int current_color = 0;
    20 static SDL_Rect *positions;
    20 static SDL_Rect *positions;
    21 static SDL_Rect *velocities;
    21 static SDL_Rect *velocities;
    22 static int sprite_w, sprite_h;
    22 static int sprite_w, sprite_h;
    23 static SDL_BlendMode blendMode = SDL_BLENDMODE_BLEND;
    23 static SDL_BlendMode blendMode = SDL_BLENDMODE_MASK;
    24 static SDL_TextureScaleMode scaleMode = SDL_TEXTURESCALEMODE_NONE;
    24 static SDL_TextureScaleMode scaleMode = SDL_TEXTURESCALEMODE_NONE;
    25 
    25 
    26 /* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */
    26 /* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */
    27 static void
    27 static void
    28 quit(int rc)
    28 quit(int rc)
   142     SDL_RenderClear();
   142     SDL_RenderClear();
   143 
   143 
   144     /* Test points */
   144     /* Test points */
   145     SDL_SetRenderDrawColor(0xFF, 0x00, 0x00, 0xFF);
   145     SDL_SetRenderDrawColor(0xFF, 0x00, 0x00, 0xFF);
   146     SDL_RenderDrawPoint(0, 0);
   146     SDL_RenderDrawPoint(0, 0);
   147     SDL_RenderDrawPoint(window_w/2-1, window_h/2-1);
   147     SDL_RenderDrawPoint(window_w-1, 0);
   148     SDL_RenderDrawPoint(window_w/2-1, window_h/2-1);
   148     SDL_RenderDrawPoint(0, window_h-1);
   149     SDL_RenderDrawPoint(window_w-1, window_h-1);
   149     SDL_RenderDrawPoint(window_w-1, window_h-1);
   150 
   150 
   151     /* Test horizontal and vertical lines */
   151     /* Test horizontal and vertical lines */
   152     SDL_SetRenderDrawColor(0x00, 0xFF, 0x00, 0xFF);
   152     SDL_SetRenderDrawColor(0x00, 0xFF, 0x00, 0xFF);
   153     SDL_RenderDrawLine(1, 0, window_w-2, 0);
   153     SDL_RenderDrawLine(1, 0, window_w-2, 0);