1
Graphics / animated images in sfml
« on: March 12, 2010, 02:30:21 am »
I was wondering if its possible to just have images like gifs, and such in sfml. Where they are animated themselves.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
void mdown()
{
if (dcount == 7)
dcount = 0;
else
dcount += 1;
ucount = 0;
lcount = 0;
rcount = 0;
}
--------------------------------------------------------
if (App.GetInput().IsKeyDown(sf::Key::Down))
{
avatar.mdown();
Sprite = avatar.dimage[avatar.dcount];
Sprite.Move(0, 100 * ElapsedTime);
}
for (dcount = 0; dcount < 8; dcount++)
{
{
stringstream num;
num << "LD" << dcount << ".JPEG"; // uses the counter for the file name
temp = num.str();
}
cout << temp << endl;
if (!dimage[dcount].LoadFromFile(temp))
cout << "Error" << endl;
}
Quote from: "rockstar8577"Well, in my computer class we usually just learn what the function is what it does and how to do it. Then we go and do a program or two with it. With these tutorials it seems more like he tells you what it is and does and that's it.You mean the programming part is missing? Hey, that's your task, not SFML's.
As stated, you'll find a lot of code examples in the forums, the wiki and some even in the SDK.