Fix off-by-one

This commit is contained in:
Kevin Lange 2012-02-08 22:42:11 -06:00
parent 3eb42fe0f0
commit 71842055f4

View File

@ -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;
}