Im having some odd rendering issues with my project that I was hoping to get some help with. There are two things Id like help with.
1) I have defined my own draw function for my classes that uses the SFML Sprite class and this function will sometimes not work. It works all the time in windows XP and for this test I have, does not work for some sprites in windows 7. Here is the code for the draw:
{
if (m_currentFrame == m_numFrames)
{
m_currentFrame = 0;
}
else
{
m_currentFrame++;
}
m_frameBox.Left = m_imageX + m_currentFrame * m_width;
m_frameBox.Right = m_imageX + (m_currentFrame+1) * m_width;
m_frameBox.Top = m_imageY;
m_frameBox.Bottom = m_imageY + m_height;
m_sprite.SetSubRect(m_frameBox);
m_sprite.SetX(m_mapX);
m_sprite.SetY(m_mapY);
app->Draw(m_sprite);
}
In my test I have 3 classes, all of which are extensions of the class in which this draw function is defined (so they are all using the same function). The draw works for all 3 classes in xp and only for 2 in 7... any idea why there is a difference?
Also, in windows 7 I'm getting black lines surrounding my tiles that I dont see in XP. Both issues are displayed in the pictures below.
Thanks for any help!