/* Sets current global font character rotation steps. 
Default is 0 (no rotation). 1 = 90deg clockwise. 2 = 180deg clockwise. 3 = 270deg clockwise. Changing the rotation, will reset the character cache. */
void gfxPrimitivesSetFontRotation(Uint32 rotation)
/* Sets current global font character rotation steps. 
Default is 0 (no rotation). 1 = 90deg clockwise. 2 = 180deg clockwise. 3 = 270deg clockwise. Changing the rotation, will reset the character cache. */
void gfxPrimitivesSetFontRotation(Uint32 rotation)
{
	int i;
	rotation = rotation & 3;
	if (charRotation != rotation)
	{
		charRotation = rotation;
		if ((charRotation==1) || (charRotation==3))
		{
			charWidthLocal = charHeight;
			charHeightLocal = charWidth;
		}
		else
		{
			charWidthLocal = charWidth;
			charHeightLocal = charHeight;
		}
		for (i = 0; i < 256; i++) {
			if (gfxPrimitivesFont[i]) {
				SDL_FreeSurface(gfxPrimitivesFont[i]);
				gfxPrimitivesFont[i] = NULL;
			}
		}
	}
}