Permalink
Browse files

changed the order of the rotation array generation, it now works

  • Loading branch information...
1 parent 620e610 commit 0fc4482115651fceba243ec62432446acf071532 @jonbro jonbro committed May 24, 2011
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/ofxSpriteSheetRenderer.cpp
@@ -37,10 +37,10 @@ ofxSpriteSheetRenderer::ofxSpriteSheetRenderer(int _numLayers, int _tilesPerLaye
safeMode = true;
gameTime = ofGetElapsedTimeMillis();
+
+ reAllocateArrays(_numLayers, _tilesPerLayer, _defaultLayer, _tileSize);
generateRotationArrays();
-
- reAllocateArrays(_numLayers, _tilesPerLayer, _defaultLayer, _tileSize);
}
ofxSpriteSheetRenderer::~ofxSpriteSheetRenderer()
@@ -102,9 +102,9 @@ void ofxSpriteSheetRenderer::allocate(int widthHeight, int internalGLScaleMode)
if(texture == NULL)
{
tileSize_f = tileSize;
- #ifdef TARGET_OPENGLES // if we don't have arb, it's crazy important that things are power of 2 so that this float is set properly
+#ifdef TARGET_OPENGLES // if we don't have arb, it's crazy important that things are power of 2 so that this float is set properly
tileSize_f /= widthHeight;
- #endif
+#endif
spriteSheetWidth = widthHeight/tileSize;
@@ -512,7 +512,7 @@ bool ofxSpriteSheetRenderer::addCenterRotatedTile(int tile_name, int frame, floa
frameX += frame*wh*tileSize_f;
addTexCoords(f, frameX, frameY, layer, wh, wh);
-
+
rot*=2;
wh*=scale;

0 comments on commit 0fc4482

Please sign in to comment.