| 183 | } |
| 184 | |
| 185 | static void |
| 186 | DrawRectRectIntersections(SDL_Renderer * renderer) |
| 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 | } |
| 200 | |
| 201 | void |
| 202 | loop() |
no test coverage detected