nicolasgramlich/AndEngine — pull request #176 by flomin (2012-09-27 15:47:23+00:00)
Title: GLES2 - TexturePacker with rotated TiledSprite bug correction

Hi,
I am using Texture packs with rotated TiledSprites (last up-to-date version of AndEngine-GLES2) and we notices that the TiledTextureRegion.create method is bugged in case the tiled texture is rotated.

Here is my way to create the TiledTexture:
```java
final TexturePack lTexturePack = new TexturePackLoader(getAssets(), getEngine().getTextureManager()).loadFromAsset(TEXTURE_PACK_PATH_TO_XML_FILE, TEXTURE_PACKED_FOLDER);
lTexturePack.loadTexture();

final TexturePackTextureRegion lTexturePackerTextureRegion = lTexturePack.getTexturePackTextureRegionLibrary().get(IMAGE_ID_IN_PACK);
final TiledTextureRegion.create(lTexturePack.getTexture(), (int) lTexturePackerTextureRegion.getTextureX(), (int) lTexturePackerTextureRegion.getTextureY(),
(int) lTexturePackerTextureRegion.getWidth(), (int) lTexturePackerTextureRegion.getHeight(),
NB_COLS, NB_ROWS, lTexturePackerTextureRegion.isRotated());
```

You can find a proposal for correction in the pull request (TiledTextureRegion.create method).

Regards,
~ Florian Minjat

P.S.: I also added some try catch and debug to the Entity.onManagedUpdate and onManagedDraw to ease the 'Detach not in UpdateThread' exceptions debug