Original Post
So I've been trying to figure out how to get rotation for any arbitrary object working, but so far I've had no luck. What I basically need to do is rotate a sprite 360 degrees around it's own center point using some sort of trigonometry as well as move the object forward depending on the direction it's facing. I was told to use the formula:
x = x * cos(theta) - y * sin(theta);
y = y * sin(theta) + y * cos(theta);
but I'm not really sure what it really does. And even if it does rotate the sprite correctly (which it doesn't), I don't know how to determine the direction it's facing so I can't move it forward. The way my design works right now, is that I have a separate class for every movable object. This is done by giving it a Top Left coordinate, and a length/width to determine its rectangle size. It then has a RECT for its bounding/collision box. Note: This is all done in 2D using C++ and DirectX