Can someone try using rotate_sprite() in a .c file and then a .cpp file and see if they are having the same problem I am, It doesnt work for me if its saved as .cpp but does as .c. At least I think thats the problem, weird as hell!
Can someone try using rotate_sprite() in a .c file and then a .cpp file and see if they are having the same problem I am, It doesnt work for me if its saved as .cpp but does as .c. At least I think thats the problem, weird as hell!
According to the manual at allegro.cc, the rotate_sprite function is as follows:
void rotate_sprite(BITMAP *bmp, BITMAP *sprite, int x, int y, fixed angle);
What exactly is the problem you're having with it? Is the compiler giving you an error message?
One thing you might try is to write a quick piece of independant code that does nothing but display a rotated bitmap on the screen. That way you can see if the problem is in your implimentation of the function, or in something else in your program.
Typically when you use rotate_sprite() in a game you want your variables to be floats to get precies accuracy so here is what you would want to do...
I'm not exactly sure why a .c or a .cpp would cause a problem with it; if you have any problems you can either pm or continue to post here.Code:float x, y, angle rotate_sprite(buffer, sprite, int(x), int(y), ftofix(angle) );
Im such an idiot!!! I forgot to convert to fix data type, sorry for such a pointles question.