First of all thanks for this wonderful extension.
However I had some issues with it, I wanted to share.
I was using the 2.0 version and noticed that tile rotation did not work at all (flipping did), so I fixed it myself with this rotation/flip code instead, it is adapted from the CCTMXLayer:
if (tile & kFlippedDiagonallyFlag) {
uint32_t flag = tile & (kFlippedHorizontallyFlag | kFlippedVerticallyFlag);
if (flag == kFlippedHorizontallyFlag) { //Rotated90
texbase[0] = right;
texbase[1] = top;
texbase[2] = right;
texbase[3] = bottom;
texbase[4] = left;
texbase[5] = top;
texbase[6] = left;
texbase[7] = bottom;
} else if (flag == kFlippedVerticallyFlag) { //Rotated270
texbase[0] = left;
texbase[1] = bottom;
texbase[2] = left;
texbase[3] = top;
texbase[4] = right;
texbase[5] = bottom;
texbase[6] = right;
texbase[7] = top;
} else if (flag == (kFlippedVerticallyFlag | kFlippedHorizontallyFlag)) { //rotated90 + flip horizontal
CC_SWAP(left,right);
texbase[0] = right;
texbase[1] = top;
texbase[2] = right;
texbase[3] = bottom;
texbase[4] = left;
texbase[5] = top;
texbase[6] = left;
texbase[7] = bottom;
} else { //Flipped Diagonal / Rotated270 + flip horizontal
CC_SWAP(left,right);
texbase[0] = left;
texbase[1] = bottom;
texbase[2] = left;
texbase[3] = top;
texbase[4] = right;
texbase[5] = bottom;
texbase[6] = right;
texbase[7] = top;
}
} else { //Rotated0
if (tile & kFlippedVerticallyFlag)
CC_SWAP(top,bottom); //flipped vertical
if (tile & kFlippedHorizontallyFlag)
CC_SWAP(left,right); //flipped horizontal
texbase[0] = left;
texbase[1] = top;
texbase[2] = right;
texbase[3] = top;
texbase[4] = left;
texbase[5] = bottom;
texbase[6] = right;
texbase[7] = bottom;
}
I also added the manual retain, but I would still like to request a fix of the rectangle tileset bug.
I do not want to redo my tilesets to be squares and fix my maps and just adding empty tiles to fill them up makes them unnecessary large.
Thanks again for that wonderful piece of code.
Drakulix