why not get createSprite to return a ''handle'' to the caller then use that in subsequent calls. In your case the handle would either be an int into the array - or what I did with an Ogl texture manager which was to pass a pointer to the data structure back (if you''re using a linked list). ie your calling code would be something like this
int hBall;hBall = createSprite("ball.bmp");/* and then elsewhere in the code */rotateSprite(hBall, 25); // why the hell rotate the actual sprite anywaydrawSprite(hBall, 5, 5);
btw. I personally feel that you shouldn''t have a routine to rotate the actual sprite, but rather you should have a routine that can draw the sprite at an angle. eg:
drawSpriteRotated(hBall, 5, 5, 25); // draw the ball at xy = (5,5) and at angle 25 deg.
Hope this helps somehow