X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fxonotic.git;a=blobdiff_plain;f=misc%2Fbuildfiles%2Fosx%2FXonotic.app%2FContents%2FFrameworks%2FSDL2.framework%2FVersions%2FA%2FHeaders%2FSDL_rect.h;h=bbcb9a3b8a2ddffaabc6c3557fe901b2bdffbe54;hp=0a95a3344958b82eaf7296407c69726503a7ec5d;hb=27137e7dcaa767683058a48f2a10552ce4c592e6;hpb=d4d74c9a52cc233ee3a305d21ee0c2e12f935830 diff --git a/misc/buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_rect.h b/misc/buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_rect.h index 0a95a334..bbcb9a3b 100644 --- a/misc/buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_rect.h +++ b/misc/buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL2.framework/Versions/A/Headers/SDL_rect.h @@ -1,6 +1,6 @@ /* Simple DirectMedia Layer - Copyright (C) 1997-2014 Sam Lantinga + Copyright (C) 1997-2016 Sam Lantinga This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -43,6 +43,7 @@ extern "C" { * \brief The structure that defines a point * * \sa SDL_EnclosePoints + * \sa SDL_PointInRect */ typedef struct SDL_Point { @@ -66,6 +67,15 @@ typedef struct SDL_Rect int w, h; } SDL_Rect; +/** + * \brief Returns true if point resides inside a rectangle. + */ +SDL_FORCE_INLINE SDL_bool SDL_PointInRect(const SDL_Point *p, const SDL_Rect *r) +{ + return ( (p->x >= r->x) && (p->x < (r->x + r->w)) && + (p->y >= r->y) && (p->y < (r->y + r->h)) ) ? SDL_TRUE : SDL_FALSE; +} + /** * \brief Returns true if the rectangle has no area. */