摘要: 假设有矩形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. 阅读全文
posted @ 2012-06-25 18:29 klobodnf 阅读(5191) 评论(0) 推荐(0) 编辑