My sprites always share the position of the first sprite if I try to animate them.
I call ID3DXSprite::SetTransform before every draw, and I have confirmed that the correct information is set for every sprite. There are 3 sprites on my app that all share the same texture, and therefore the same animation.
I generate a RECT every frame (if necessary) to pass to the pSrcRect parameter of ID3DXSprite::Draw. It's pretty obvious how to do so with the above image. Take a RECT of the first frame and just shift the thing over, looping back if necessary.
If I use a constant RECT of the first frame, all the sprites are placed exactly where I want them. However, if I use my animations, all sprites snap to the position of the first even though the correct transformations are passed.
If you need to see relevant snippets...
With animation
m_pSprite->SetTransform(&matrix);
// Everything animates fine... in one spot.
m_pSprite->Draw(m_pTexture,&m_SpriteSheet.Output,0,0,~0);
Without animation
RECT r = {0,0,64,64};
m_pSprite->SetTransform(&matrix);
// Everything is placed fine... With no animation
m_pSprite->Draw(m_pTexture,&r,0,0,~0);
So, everything is fine except the pSrcRect param is giving me a black and white situation.
What gives?