SDL  2.0
testintersections.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include "SDL_test_common.h"
+ Include dependency graph for testintersections.c:

Go to the source code of this file.

Macros

#define SWAP(typ, a, b)   do{typ t=a;a=b;b=t;}while(0)
 
#define NUM_OBJECTS   100
 
#define MAX_LINES   16
 
#define MAX_RECTS   16
 

Functions

void DrawPoints (SDL_Renderer *renderer)
 
static int add_line (int x1, int y1, int x2, int y2)
 
void DrawLines (SDL_Renderer *renderer)
 
static int add_rect (int x1, int y1, int x2, int y2)
 
static void DrawRects (SDL_Renderer *renderer)
 
static void DrawRectLineIntersections (SDL_Renderer *renderer)
 
static void DrawRectRectIntersections (SDL_Renderer *renderer)
 
void loop ()
 
int main (int argc, char *argv[])
 

Variables

static SDLTest_CommonStatestate
 
static int num_objects
 
static SDL_bool cycle_color
 
static SDL_bool cycle_alpha
 
static int cycle_direction = 1
 
static int current_alpha = 255
 
static int current_color = 255
 
static SDL_BlendMode blendMode = SDL_BLENDMODE_NONE
 
int mouse_begin_x = -1
 
int mouse_begin_y = -1
 
int done
 
int num_lines = 0
 
SDL_Rect lines [MAX_LINES]
 
int num_rects = 0
 
SDL_Rect rects [MAX_RECTS]
 

Macro Definition Documentation

#define MAX_LINES   16

Definition at line 83 of file testintersections.c.

Referenced by add_line().

#define MAX_RECTS   16

Definition at line 127 of file testintersections.c.

Referenced by add_rect().

#define NUM_OBJECTS   100

Definition at line 26 of file testintersections.c.

Referenced by main().

#define SWAP (   typ,
  a,
  b 
)    do{typ t=a;a=b;b=t;}while(0)

Definition at line 25 of file testintersections.c.

Referenced by add_rect().

Function Documentation

static int add_line ( int  x1,
int  y1,
int  x2,
int  y2 
)
static

Definition at line 87 of file testintersections.c.

References SDL_Rect::h, MAX_LINES, num_lines, SDL_Log, SDL_Rect::w, SDL_Rect::x, and SDL_Rect::y.

Referenced by loop().

88 {
89  if (num_lines >= MAX_LINES)
90  return 0;
91  if ((x1 == x2) && (y1 == y2))
92  return 0;
93 
94  SDL_Log("adding line (%d, %d), (%d, %d)\n", x1, y1, x2, y2);
95  lines[num_lines].x = x1;
96  lines[num_lines].y = y1;
97  lines[num_lines].w = x2;
98  lines[num_lines].h = y2;
99 
100  return ++num_lines;
101 }
GLuint GLfloat GLfloat GLfloat x1
int num_lines
GLfixed GLfixed GLfixed y2
GLfixed GLfixed x2
#define MAX_LINES
GLfixed y1
#define SDL_Log
SDL_Rect lines[MAX_LINES]
int x
Definition: SDL_rect.h:66
int w
Definition: SDL_rect.h:67
int h
Definition: SDL_rect.h:67
int y
Definition: SDL_rect.h:66
static int add_rect ( int  x1,
int  y1,
int  x2,
int  y2 
)
static

Definition at line 131 of file testintersections.c.

References SDL_Rect::h, MAX_RECTS, num_rects, SDL_Log, SWAP, SDL_Rect::w, SDL_Rect::x, and SDL_Rect::y.

Referenced by loop().

132 {
133  if (num_rects >= MAX_RECTS)
134  return 0;
135  if ((x1 == x2) || (y1 == y2))
136  return 0;
137 
138  if (x1 > x2)
139  SWAP(int, x1, x2);
140  if (y1 > y2)
141  SWAP(int, y1, y2);
142 
143  SDL_Log("adding rect (%d, %d), (%d, %d) [%dx%d]\n", x1, y1, x2, y2,
144  x2 - x1, y2 - y1);
145 
146  rects[num_rects].x = x1;
147  rects[num_rects].y = y1;
148  rects[num_rects].w = x2 - x1;
149  rects[num_rects].h = y2 - y1;
150 
151  return ++num_rects;
152 }
GLuint GLfloat GLfloat GLfloat x1
GLfixed GLfixed GLfixed y2
GLfixed GLfixed x2
GLfixed y1
#define SDL_Log
int num_rects
#define SWAP(typ, a, b)
int x
Definition: SDL_rect.h:66
int w
Definition: SDL_rect.h:67
int h
Definition: SDL_rect.h:67
SDL_Rect rects[MAX_RECTS]
#define MAX_RECTS
int y
Definition: SDL_rect.h:66
void DrawLines ( SDL_Renderer renderer)

Definition at line 105 of file testintersections.c.

References SDL_Rect::h, i, num_lines, SDL_RenderDrawLine, SDL_RenderGetViewport, SDL_SetRenderDrawColor, viewport, and SDL_Rect::w.

Referenced by loop().

106 {
107  int i;
109 
110  /* Query the sizes */
111  SDL_RenderGetViewport(renderer, &viewport);
112 
113  SDL_SetRenderDrawColor(renderer, 255, 255, 255, 255);
114 
115  for (i = 0; i < num_lines; ++i) {
116  if (i == -1) {
117  SDL_RenderDrawLine(renderer, 0, 0, viewport.w - 1, viewport.h - 1);
118  SDL_RenderDrawLine(renderer, 0, viewport.h - 1, viewport.w - 1, 0);
119  SDL_RenderDrawLine(renderer, 0, viewport.h / 2, viewport.w - 1, viewport.h / 2);
120  SDL_RenderDrawLine(renderer, viewport.w / 2, 0, viewport.w / 2, viewport.h - 1);
121  } else {
122  SDL_RenderDrawLine(renderer, lines[i].x, lines[i].y, lines[i].w, lines[i].h);
123  }
124  }
125 }
int num_lines
GLint GLint GLint GLint GLint x
Definition: SDL_opengl.h:1567
#define SDL_RenderGetViewport
SDL_Rect lines[MAX_LINES]
int w
Definition: SDL_rect.h:67
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
Definition: SDL_x11sym.h:42
GLint GLint GLint GLint GLint GLint y
Definition: SDL_opengl.h:1567
int h
Definition: SDL_rect.h:67
SDL_Rect viewport
Definition: testviewport.c:28
#define SDL_SetRenderDrawColor
GLubyte GLubyte GLubyte GLubyte w
#define SDL_RenderDrawLine
GLfloat GLfloat GLfloat GLfloat h
A rectangle, with the origin at the upper left.
Definition: SDL_rect.h:64
void DrawPoints ( SDL_Renderer renderer)

Definition at line 41 of file testintersections.c.

References current_alpha, current_color, cycle_alpha, cycle_color, cycle_direction, SDL_Rect::h, i, num_objects, SDL_RenderDrawPoint, SDL_RenderGetViewport, SDL_SetRenderDrawColor, viewport, and SDL_Rect::w.

Referenced by loop().

42 {
43  int i;
44  int x, y;
46 
47  /* Query the sizes */
48  SDL_RenderGetViewport(renderer, &viewport);
49 
50  for (i = 0; i < num_objects * 4; ++i) {
51  /* Cycle the color and alpha, if desired */
52  if (cycle_color) {
54  if (current_color < 0) {
55  current_color = 0;
57  }
58  if (current_color > 255) {
59  current_color = 255;
61  }
62  }
63  if (cycle_alpha) {
65  if (current_alpha < 0) {
66  current_alpha = 0;
68  }
69  if (current_alpha > 255) {
70  current_alpha = 255;
72  }
73  }
75  (Uint8) current_color, (Uint8) current_alpha);
76 
77  x = rand() % viewport.w;
78  y = rand() % viewport.h;
79  SDL_RenderDrawPoint(renderer, x, y);
80  }
81 }
#define SDL_RenderDrawPoint
static SDL_bool cycle_alpha
static int cycle_direction
GLint GLint GLint GLint GLint x
Definition: SDL_opengl.h:1567
uint8_t Uint8
An unsigned 8-bit integer type.
Definition: SDL_stdinc.h:139
#define SDL_RenderGetViewport
int w
Definition: SDL_rect.h:67
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
Definition: SDL_x11sym.h:42
GLint GLint GLint GLint GLint GLint y
Definition: SDL_opengl.h:1567
int h
Definition: SDL_rect.h:67
SDL_Rect viewport
Definition: testviewport.c:28
static int current_color
static int num_objects
static SDL_bool cycle_color
static int current_alpha
#define SDL_SetRenderDrawColor
A rectangle, with the origin at the upper left.
Definition: SDL_rect.h:64
static void DrawRectLineIntersections ( SDL_Renderer renderer)
static

Definition at line 162 of file testintersections.c.

References SDL_Rect::h, i, j, num_lines, num_rects, SDL_IntersectRectAndLine, SDL_RenderDrawLine, SDL_SetRenderDrawColor, SDL_Rect::w, SDL_Rect::x, and SDL_Rect::y.

Referenced by loop().

163 {
164  int i, j;
165 
166  SDL_SetRenderDrawColor(renderer, 0, 255, 55, 255);
167 
168  for (i = 0; i < num_rects; i++)
169  for (j = 0; j < num_lines; j++) {
170  int x1, y1, x2, y2;
171  SDL_Rect r;
172 
173  r = rects[i];
174  x1 = lines[j].x;
175  y1 = lines[j].y;
176  x2 = lines[j].w;
177  y2 = lines[j].h;
178 
179  if (SDL_IntersectRectAndLine(&r, &x1, &y1, &x2, &y2)) {
180  SDL_RenderDrawLine(renderer, x1, y1, x2, y2);
181  }
182  }
183 }
GLdouble GLdouble GLdouble r
Definition: SDL_opengl.h:2072
GLuint GLfloat GLfloat GLfloat x1
int num_lines
GLfixed GLfixed GLfixed y2
GLfixed GLfixed x2
GLfixed y1
int num_rects
SDL_Rect lines[MAX_LINES]
int x
Definition: SDL_rect.h:66
int w
Definition: SDL_rect.h:67
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
Definition: SDL_x11sym.h:42
int h
Definition: SDL_rect.h:67
SDL_Rect rects[MAX_RECTS]
#define SDL_SetRenderDrawColor
#define SDL_IntersectRectAndLine
#define SDL_RenderDrawLine
int y
Definition: SDL_rect.h:66
A rectangle, with the origin at the upper left.
Definition: SDL_rect.h:64
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int int in j)
Definition: SDL_x11sym.h:42
static void DrawRectRectIntersections ( SDL_Renderer renderer)
static

Definition at line 186 of file testintersections.c.

References i, j, num_rects, SDL_IntersectRect, SDL_RenderFillRect, and SDL_SetRenderDrawColor.

Referenced by loop().

187 {
188  int i, j;
189 
190  SDL_SetRenderDrawColor(renderer, 255, 200, 0, 255);
191 
192  for (i = 0; i < num_rects; i++)
193  for (j = i + 1; j < num_rects; j++) {
194  SDL_Rect r;
195  if (SDL_IntersectRect(&rects[i], &rects[j], &r)) {
196  SDL_RenderFillRect(renderer, &r);
197  }
198  }
199 }
GLdouble GLdouble GLdouble r
Definition: SDL_opengl.h:2072
#define SDL_RenderFillRect
#define SDL_IntersectRect
int num_rects
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
Definition: SDL_x11sym.h:42
SDL_Rect rects[MAX_RECTS]
#define SDL_SetRenderDrawColor
A rectangle, with the origin at the upper left.
Definition: SDL_rect.h:64
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int int in j)
Definition: SDL_x11sym.h:42
static void DrawRects ( SDL_Renderer renderer)
static

Definition at line 155 of file testintersections.c.

References num_rects, SDL_RenderFillRects, and SDL_SetRenderDrawColor.

Referenced by loop().

156 {
157  SDL_SetRenderDrawColor(renderer, 255, 127, 0, 255);
158  SDL_RenderFillRects(renderer, rects, num_rects);
159 }
#define SDL_RenderFillRects
int num_rects
SDL_Rect rects[MAX_RECTS]
#define SDL_SetRenderDrawColor
void loop ( )

Definition at line 202 of file testintersections.c.

References add_line(), add_rect(), SDL_MouseButtonEvent::button, SDL_Event::button, done, DrawLines(), DrawPoints(), DrawRectLineIntersections(), DrawRectRectIntersections(), DrawRects(), i, SDL_Event::key, SDL_KeyboardEvent::keysym, KMOD_SHIFT, SDL_Keysym::mod, mouse_begin_x, mouse_begin_y, NULL, num_lines, num_rects, SDLTest_CommonState::num_windows, renderer, SDLTest_CommonState::renderers, SDL_KEYDOWN, SDL_MOUSEBUTTONDOWN, SDL_MOUSEBUTTONUP, SDL_PollEvent, SDL_RenderClear, SDL_RenderPresent, SDL_SetRenderDrawColor, SDLTest_CommonEvent(), SDL_Keysym::sym, SDL_Event::type, SDLTest_CommonState::windows, SDL_MouseButtonEvent::x, and SDL_MouseButtonEvent::y.

Referenced by main().

203 {
204  int i;
206 
207  /* Check for events */
208  while (SDL_PollEvent(&event)) {
209  SDLTest_CommonEvent(state, &event, &done);
210  switch (event.type) {
211  case SDL_MOUSEBUTTONDOWN:
212  mouse_begin_x = event.button.x;
213  mouse_begin_y = event.button.y;
214  break;
215  case SDL_MOUSEBUTTONUP:
216  if (event.button.button == 3)
218  event.button.y);
219  if (event.button.button == 1)
221  event.button.y);
222  break;
223  case SDL_KEYDOWN:
224  switch (event.key.keysym.sym) {
225  case 'l':
226  if (event.key.keysym.mod & KMOD_SHIFT)
227  num_lines = 0;
228  else
229  add_line(rand() % 640, rand() % 480, rand() % 640,
230  rand() % 480);
231  break;
232  case 'r':
233  if (event.key.keysym.mod & KMOD_SHIFT)
234  num_rects = 0;
235  else
236  add_rect(rand() % 640, rand() % 480, rand() % 640,
237  rand() % 480);
238  break;
239  }
240  break;
241  default:
242  break;
243  }
244  }
245  for (i = 0; i < state->num_windows; ++i) {
247  if (state->windows[i] == NULL)
248  continue;
249  SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF);
250  SDL_RenderClear(renderer);
251 
252  DrawRects(renderer);
253  DrawPoints(renderer);
254  DrawRectRectIntersections(renderer);
255  DrawLines(renderer);
256  DrawRectLineIntersections(renderer);
257 
258  SDL_RenderPresent(renderer);
259  }
260 #ifdef __EMSCRIPTEN__
261  if (done) {
262  emscripten_cancel_main_loop();
263  }
264 #endif
265 }
#define SDL_PollEvent
void DrawLines(SDL_Renderer *renderer)
int done
int mouse_begin_x
int num_lines
static void DrawRects(SDL_Renderer *renderer)
int mouse_begin_y
SDL_Window ** windows
void DrawPoints(SDL_Renderer *renderer)
SDL_Renderer * renderer
void SDLTest_CommonEvent(SDLTest_CommonState *state, SDL_Event *event, int *done)
Common event handler for test windows.
int num_rects
#define KMOD_SHIFT
Definition: SDL_keycode.h:335
struct _cl_event * event
static void DrawRectRectIntersections(SDL_Renderer *renderer)
static int add_line(int x1, int y1, int x2, int y2)
SDL_Keysym keysym
Definition: SDL_events.h:196
SDL_Renderer ** renderers
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
Definition: SDL_x11sym.h:42
#define NULL
Definition: begin_code.h:143
Uint16 mod
Definition: SDL_keyboard.h:51
static void DrawRectLineIntersections(SDL_Renderer *renderer)
#define SDL_RenderClear
SDL_KeyboardEvent key
Definition: SDL_events.h:526
SDL_Keycode sym
Definition: SDL_keyboard.h:50
SDL_MouseButtonEvent button
Definition: SDL_events.h:530
General event structure.
Definition: SDL_events.h:521
#define SDL_SetRenderDrawColor
static int add_rect(int x1, int y1, int x2, int y2)
static SDLTest_CommonState * state
#define SDL_RenderPresent
Uint32 type
Definition: SDL_events.h:523
int main ( int  argc,
char *  argv[] 
)

Definition at line 268 of file testintersections.c.

References blendMode, cycle_alpha, cycle_color, done, i, loop(), NULL, NUM_OBJECTS, num_objects, SDLTest_CommonState::num_windows, renderer, SDLTest_CommonState::renderers, SDL_atoi, SDL_BLENDMODE_ADD, SDL_BLENDMODE_BLEND, SDL_BLENDMODE_MOD, SDL_BLENDMODE_NONE, SDL_GetTicks(), SDL_INIT_VIDEO, SDL_isdigit, SDL_Log, SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, SDL_LogSetPriority, SDL_RenderClear, SDL_SetRenderDrawBlendMode, SDL_SetRenderDrawColor, SDL_strcasecmp, SDL_TRUE, SDLTest_CommonArg(), SDLTest_CommonCreateState(), SDLTest_CommonInit(), SDLTest_CommonQuit(), and SDLTest_CommonUsage().

269 {
270  int i;
271  Uint32 then, now, frames;
272 
273  /* Enable standard application logging */
275 
276  /* Initialize parameters */
278 
279  /* Initialize test framework */
281  if (!state) {
282  return 1;
283  }
284  for (i = 1; i < argc;) {
285  int consumed;
286 
287  consumed = SDLTest_CommonArg(state, i);
288  if (consumed == 0) {
289  consumed = -1;
290  if (SDL_strcasecmp(argv[i], "--blend") == 0) {
291  if (argv[i + 1]) {
292  if (SDL_strcasecmp(argv[i + 1], "none") == 0) {
294  consumed = 2;
295  } else if (SDL_strcasecmp(argv[i + 1], "blend") == 0) {
297  consumed = 2;
298  } else if (SDL_strcasecmp(argv[i + 1], "add") == 0) {
300  consumed = 2;
301  } else if (SDL_strcasecmp(argv[i + 1], "mod") == 0) {
303  consumed = 2;
304  }
305  }
306  } else if (SDL_strcasecmp(argv[i], "--cyclecolor") == 0) {
308  consumed = 1;
309  } else if (SDL_strcasecmp(argv[i], "--cyclealpha") == 0) {
311  consumed = 1;
312  } else if (SDL_isdigit(*argv[i])) {
313  num_objects = SDL_atoi(argv[i]);
314  consumed = 1;
315  }
316  }
317  if (consumed < 0) {
318  SDL_Log("Usage: %s %s [--blend none|blend|add|mod] [--cyclecolor] [--cyclealpha]\n",
319  argv[0], SDLTest_CommonUsage(state));
320  return 1;
321  }
322  i += consumed;
323  }
324  if (!SDLTest_CommonInit(state)) {
325  return 2;
326  }
327 
328  /* Create the windows and initialize the renderers */
329  for (i = 0; i < state->num_windows; ++i) {
332  SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF);
333  SDL_RenderClear(renderer);
334  }
335 
336  srand(time(NULL));
337 
338  /* Main render loop */
339  frames = 0;
340  then = SDL_GetTicks();
341  done = 0;
342 
343 #ifdef __EMSCRIPTEN__
344  emscripten_set_main_loop(loop, 0, 1);
345 #else
346  while (!done) {
347  ++frames;
348  loop();
349  }
350 #endif
351 
353 
354  /* Print out some timing information */
355  now = SDL_GetTicks();
356  if (now > then) {
357  double fps = ((double) frames * 1000) / (now - then);
358  SDL_Log("%2.2f frames per second\n", fps);
359  }
360  return 0;
361 }
static SDL_BlendMode blendMode
static SDL_bool cycle_alpha
uint32_t Uint32
An unsigned 32-bit integer type.
Definition: SDL_stdinc.h:155
int done
SDLTest_CommonState * SDLTest_CommonCreateState(char **argv, Uint32 flags)
Parse command line parameters and create common state.
#define NUM_OBJECTS
int SDLTest_CommonArg(SDLTest_CommonState *state, int index)
Process one common argument.
#define SDL_SetRenderDrawBlendMode
#define SDL_strcasecmp
SDL_bool SDLTest_CommonInit(SDLTest_CommonState *state)
Open test window.
SDL_Renderer * renderer
#define SDL_Log
#define SDL_isdigit
Uint32 SDL_GetTicks(void)
Get the number of milliseconds since the SDL library initialization.
const char * SDLTest_CommonUsage(SDLTest_CommonState *state)
Returns common usage information.
#define SDL_atoi
SDL_Renderer ** renderers
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
Definition: SDL_x11sym.h:42
#define SDL_LogSetPriority
void loop()
#define NULL
Definition: begin_code.h:143
#define SDL_RenderClear
static int num_objects
static SDL_bool cycle_color
#define SDL_SetRenderDrawColor
static SDLTest_CommonState * state
void SDLTest_CommonQuit(SDLTest_CommonState *state)
Close test window.
#define SDL_INIT_VIDEO
Definition: SDL.h:77

Variable Documentation

SDL_BlendMode blendMode = SDL_BLENDMODE_NONE
static

Definition at line 35 of file testintersections.c.

Referenced by main().

int current_alpha = 255
static

Definition at line 33 of file testintersections.c.

Referenced by DrawPoints().

int current_color = 255
static

Definition at line 34 of file testintersections.c.

Referenced by DrawPoints().

SDL_bool cycle_alpha
static

Definition at line 31 of file testintersections.c.

Referenced by DrawPoints(), and main().

SDL_bool cycle_color
static

Definition at line 30 of file testintersections.c.

Referenced by DrawPoints(), and main().

int cycle_direction = 1
static

Definition at line 32 of file testintersections.c.

Referenced by DrawPoints().

int done

Definition at line 38 of file testintersections.c.

Referenced by loop(), and main().

Definition at line 85 of file testintersections.c.

int mouse_begin_x = -1

Definition at line 37 of file testintersections.c.

Referenced by loop().

int mouse_begin_y = -1

Definition at line 37 of file testintersections.c.

Referenced by loop().

int num_lines = 0

Definition at line 84 of file testintersections.c.

Referenced by add_line(), DrawLines(), DrawRectLineIntersections(), and loop().

int num_objects
static

Definition at line 29 of file testintersections.c.

Referenced by DrawPoints(), and main().

int num_rects = 0

Definition at line 129 of file testintersections.c.

SDLTest_CommonState* state
static

Definition at line 28 of file testintersections.c.