int width = regionWidth;\r
int height = regionHeight;\r
\r
- if (width < 0) {\r
- x = x - width;\r
- width = -width;\r
- }\r
-\r
- if (height < 0) {\r
- y = y - height;\r
- height = -height;\r
- }\r
-\r
int rows = height / tileHeight;\r
int cols = width / tileWidth;\r
\r