Mercurial > sdl-ios-xcode
diff src/video/SDL_shape.c @ 4836:7eb8ca721a5b
Fixed the off-by-one bug in SDL_RecursivelyCalculateShapeTree().
author | egottlieb |
---|---|
date | Fri, 06 Aug 2010 13:52:38 -0400 |
parents | fd5bb97ec05d |
children | 2e446923c9fb |
line wrap: on
line diff
--- a/src/video/SDL_shape.c Thu Aug 05 21:27:32 2010 -0400 +++ b/src/video/SDL_shape.c Fri Aug 06 13:52:38 2010 -0400 @@ -168,13 +168,13 @@ next.x = dimensions.x; next.y = dimensions.y; result->data.children.upleft = (struct SDL_ShapeTree *)RecursivelyCalculateShapeTree(mode,mask,invert,next); - next.x = dimensions.w / 2 + 1; + next.x = dimensions.w / 2; //Unneeded: next.y = dimensions.y; result->data.children.upright = (struct SDL_ShapeTree *)RecursivelyCalculateShapeTree(mode,mask,invert,next); next.x = dimensions.x; - next.y = dimensions.h / 2 + 1; + next.y = dimensions.h / 2; result->data.children.downleft = (struct SDL_ShapeTree *)RecursivelyCalculateShapeTree(mode,mask,invert,next); - next.x = dimensions.w / 2 + 1; + next.x = dimensions.w / 2; //Unneeded: next.y = dimensions.h / 2 + 1; result->data.children.downright = (struct SDL_ShapeTree *)RecursivelyCalculateShapeTree(mode,mask,invert,next); return result;