摘要:
假设有矩形RECT1和RECT2、有八个顶点 1 bool test_collision__2(SDL_Rect *rect1, SDL_Rect *rect2) 2 { 3 int x1_1 = rect1->x; 4 int y1_1 = rect1->y; 5 int x1_2 = rect1->x + rect1->w; 6 int y1_2 = rect1->y; 7 int x1_3 = rect1->x; 8 int y1_3 = rect1->y + rect1->h; 9 int x1_4 = rect1->x + re. 阅读全文