Hmmm I can't seem to fix your problem yet. However I have noticed some mistakes.
To make sure that i and j are only added to 32 times:
- Code: Select all
for(i=-16; i<15; i++)
{
for(j=-16; j<15; j++)
{
Otherwise it will go through 33 times. Or i and j will both get to 16. Oh and there was a semicolon after the for loop for j, taking that out should make a big difference.
Also in the global code I took out the semicolon after the #define:
- Code: Select all
#define PI=3.1415926535897932384626433832795
I think in this instance it won't make a difference, but it's good practice to not put semicolons after #defines.
Unfortunately I do not have the time now to go through the rest but the program looks very nice.
It's great that you are making a program such as this, however if you are just making it because you can't find a good alternative then I recommend GraphicsGale. It's perfect for pixel art and you can rotate and go crazy. Plus it's free.
You can find it here:
http://www.humanbalance.net/gale/us/
There is a version that you can buy, but that's only for some extra stuff. The free version is perfect for pixel art.
Have a great time.