小编Jac*_*les的帖子

错误:获取临时[-fpermissive]的地址

我一直在研究这几个小时,但没有用.基本上我有

struct rectangle {
    int x, y, w, h;
};

rectangle player::RegionCoordinates() // Region Coord
{
    rectangle temp;
    temp.x = colRegion.x + coordinates.x;
    temp.w = colRegion.w;
    temp.y = colRegion.y + coordinates.y;
    temp.h = colRegion.h;

    return temp;
}

// Collision detect function
bool IsCollision (rectangle * r1, rectangle * r2)
{
    if (r1->x < r2->x + r2->w &&
        r1->x + r1->w > r2->x &&
        r1->y < r2->y + r2->h &&
        r1->y + r1->h > r2->y) 
        {
            return true;
        }
    return false; …
Run Code Online (Sandbox Code Playgroud)

c++ collision-detection allegro collision

12
推荐指数
3
解决办法
4万
查看次数

标签 统计

allegro ×1

c++ ×1

collision ×1

collision-detection ×1