Commit c24222cb authored by Sam Lantinga's avatar Sam Lantinga

Add a few test pattern lines

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403354
parent 67946ae5
...@@ -63,12 +63,19 @@ DrawLines(SDL_WindowID window) ...@@ -63,12 +63,19 @@ DrawLines(SDL_WindowID window)
SDL_SetRenderDrawColor(255, (Uint8) current_color, SDL_SetRenderDrawColor(255, (Uint8) current_color,
(Uint8) current_color, (Uint8) current_alpha); (Uint8) current_color, (Uint8) current_alpha);
if (i == 0) {
SDL_RenderLine(0, 0, window_w, window_h);
SDL_RenderLine(0, window_h, window_w, 0);
SDL_RenderLine(0, window_h/2, window_w, window_h/2);
SDL_RenderLine(window_w/2, 0, window_w/2, window_h);
} else {
x1 = rand() % window_w; x1 = rand() % window_w;
x2 = rand() % window_w; x2 = rand() % window_w;
y1 = rand() % window_h; y1 = rand() % window_h;
y2 = rand() % window_h; y2 = rand() % window_h;
SDL_RenderLine(x1, y1, x2, y2); SDL_RenderLine(x1, y1, x2, y2);
} }
}
SDL_SetRenderDrawBlendMode(SDL_BLENDMODE_NONE); SDL_SetRenderDrawBlendMode(SDL_BLENDMODE_NONE);
/* Update the screen! */ /* Update the screen! */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment