From 7037d84191722581e0a7be72031b6b10d45cf1e3 Mon Sep 17 00:00:00 2001 From: damdoum Date: Thu, 18 Jan 2007 14:45:16 +0000 Subject: [PATCH] comments --- desmume/src/GPU.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/desmume/src/GPU.c b/desmume/src/GPU.c index 785a9306a..eafd208ee 100644 --- a/desmume/src/GPU.c +++ b/desmume/src/GPU.c @@ -504,6 +504,10 @@ INLINE BOOL withinRect (u8 x,u8 y, u16 startX, u16 startY, u16 endX, u16 endY) BOOL wrapx, wrapy, goodx, goody; wrapx = startX > endX; wrapy = startY > endY; + // when the start > end, + // all points between start & end are outside the window, + // otherwise + // they are inside goodx = (wrapx)? ((startX <= x)||(x <= endX)):((startX <= x)&&(x <= endX)); goody = (wrapy)? ((startY <= y)||(y <= endY)):((startY <= y)&&(y <= endY)); return (goodx && goody);