Fix off-by-one
This commit is contained in:
parent
3eb42fe0f0
commit
71842055f4
@ -142,11 +142,11 @@ uint32_t alpha_blend(uint32_t bottom, uint32_t top, uint32_t mask) {
|
||||
int out_of_bounds(int x, int y) {
|
||||
if (x < graphics_width / 2 - WINDOW_SIZE)
|
||||
return 1;
|
||||
if (x > graphics_width / 2 + WINDOW_SIZE)
|
||||
if (x >= graphics_width / 2 + WINDOW_SIZE)
|
||||
return 1;
|
||||
if (y < graphics_height / 2 - WINDOW_SIZE)
|
||||
return 1;
|
||||
if (y > graphics_height / 2 + WINDOW_SIZE)
|
||||
if (y >= graphics_height / 2 + WINDOW_SIZE)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user