Skip to content

Commit

Permalink
changed the order of the rotation array generation, it now works
Browse files Browse the repository at this point in the history
  • Loading branch information
jonbro committed May 24, 2011
1 parent 620e610 commit 0fc4482
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/ofxSpriteSheetRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 0fc4482

Please sign in to comment.