| 84 | int num_lines = 0; |
| 85 | SDL_Rect lines[MAX_LINES]; |
| 86 | static int |
| 87 | add_line(int x1, int y1, int x2, int y2) |
| 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 | } |
| 102 | |
| 103 | |
| 104 | void |