#include "Object.h"

u8 testObjectIntersection(Object* a, Object* b)
{
    if (a->position.x + a->width > b->position.x && a->position.x < b->position.x + b->width)
    {
        if (a->position.y + a->height > b->position.y && a->position.y < b->position.y + b->height)
        {
            return TRUE;
        }
    }

    return FALSE;
}

u8 testObjectIntersectionBVelocity(Object* a, Object* b)
{
    if (a->position.x + a->width > b->position.x + b->velocity.x && a->position.x < b->position.x + b->velocity.x + b->width)
    {
        if (a->position.y + a->height > b->position.y + b->velocity.y && a->position.y < b->position.y + b->height + b->velocity.y)
        {
            return TRUE;
        }
    }

    return FALSE;
}