I have car sprites in a game (2-D top down) where I have a single bitmap of the car (24x24 PNG with alpha). I track the location of the car by the midpoint of the sprite (11, 11) and the orientation by the degrees it is rotated (0..359).
When I draw the image to the windows (this is a Forms app), how can I draw it with the rotation, handling the fact that the bitmap bounds can be as great as 34x34 (45 degree angle)?
The three question in this are:
- How do I tell it the angle to rotate in the draw?
- What is the location of the upper left corner for the draw (or can I give it the center)?
- What are the dimensions for the draw (or can I tell it to map 1 bitmap pixel to 1 pixel on the screen)?
thanks - dave
Who will win The Windward International Collegiate Programming Championships?