SDL API renaming: SDL_rect.h

Fixes https://github.com/libsdl-org/SDL/issues/6887
This commit is contained in:
Sam Lantinga
2022-12-27 11:01:11 -08:00
parent a28d1d59be
commit 58aecf0a54
32 changed files with 379 additions and 323 deletions

View File

@@ -184,7 +184,7 @@ DrawRectLineIntersections(SDL_Renderer *renderer)
x2 = lines[j].w;
y2 = lines[j].h;
if (SDL_IntersectRectAndLine(&r, &x1, &y1, &x2, &y2)) {
if (SDL_GetRectAndLineIntersection(&r, &x1, &y1, &x2, &y2)) {
SDL_RenderLine(renderer, x1, y1, x2, y2);
}
}
@@ -201,7 +201,7 @@ DrawRectRectIntersections(SDL_Renderer *renderer)
for (i = 0; i < num_rects; i++) {
for (j = i + 1; j < num_rects; j++) {
SDL_Rect r;
if (SDL_IntersectRect(&rects[i], &rects[j], &r)) {
if (SDL_GetRectIntersection(&rects[i], &rects[j], &r)) {
SDL_RenderFillRect(renderer, &r);
}
}