Rotating sprites in allegro.
This code works great, but only allows a 90 degree rotation of the sprite. I assume this is because of allegro and I think every other graphics lib assuming top left is 0,0 and going from there so I am only playing in one quad... I am wondering how to make it rotate all 360 degrees do I just make a correction factor based on the screen size or what?
Answered my own question. Subtracting half of the screen size from each var allows for 360 degree rotation. center the sprite by subbing half the size in x and y... Now to get a grappling hook working for movement...
player = load_bitmap("Player.bmp",NULL);
BUFFER = create_bitmap(scrx,scry);
int angle = fixatan2(mouse_y, mouse_x);