I have two suggestions that I hope will be useful to you.
Originally posted by speve
else if (Select==2)
else if (Select==3)
The first is to not have so many functions that do the same (or very similar) things. With your BasicSaveStructure() preceeding the "rotation save" function it is clear that every save has some things in common, and you also want to be able to save at different rotations. Will something like this work for you?
A rotation value of zero is 'normal'. A negative value for rotation indicates it is inverted (-90 is Invert90).
void SaveFile( short rotation )
/* Do your 'basic save' tasks here */
/* Do you rotation specific tasks here */
My second suggestion is to replace your large if .. else if block with a switch statement:
You have now accomplished your basic and rotation specific tasks with a single function call. If I have misunderstood your question, feel free to point me in the right direction
rotation = 0;
rotation = 90;
rotation = 180;
rotation = 270;
rotation = -360; /* perhaps you have a better value for this */
rotation = -90;
rotation = -180;
rotation = -270;
break; /* not needed, but a nice coding habit to get into */
SaveFile( rotation );