Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

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.


Topics - rockstar8577

Pages: [1]
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.

2
Graphics / Program won't load images
« on: March 09, 2010, 09:40:37 pm »
Code: [Select]

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;
            }


For some reason it gets an error loading the image.
Post if you want to see more of the code.[/code]

Error which appears on the console
Failed to load image "LD1.JPEG". Reason : Unable to open file
Failed to load image "LD2.JPEG". Reason : Unable to open file
Failed to load image "LD3.JPEG". Reason : Unable to open file
Failed to load image "LD4.JPEG". Reason : Unable to open file
Failed to load image "LD5.JPEG". Reason : Unable to open file
Failed to load image "LD6.JPEG". Reason : Unable to open file
Failed to load image "LD7.JPEG". Reason : Unable to open file
Failed to load image "LD8.JPEG". Reason : Unable to open file
Failed to load image "LL1.JPEG". Reason : Unable to open file
Failed to load image "LL2.JPEG". Reason : Unable to open file
Failed to load image "LL3.JPEG". Reason : Unable to open file
Failed to load image "LL4.JPEG". Reason : Unable to open file
Failed to load image "LL5.JPEG". Reason : Unable to open file
Failed to load image "LL6.JPEG". Reason : Unable to open file

And the paths are correct because i had the files in a folder the first time, then i placed them in the source file location and still nothing.

3
SFML website / Tutorials
« on: February 05, 2010, 04:34:08 am »
I was wondering if you could maybe make some more in depth tutorials. The tutorials are fine, it explains them but it doesnt really give the reader a feel of using it. Well not for me anyways i was wondering if others thought the same.

4
General / string.SetText()
« on: January 24, 2010, 07:09:41 pm »
Is there a way to set the text of a string to a float, or an integer?

*Edit*
Thanks Laurent, i saw what you posted on another topic that had the same question. :)

Incase anyone needs the same answer

//Modified for SFML
#include <sstream>

var variable_name = x;
std::stringstream out;
out << variable_name;
sting_name.SetText(out.str());

//Original Way
#include <sstream>

int i = 5;
std::string s;
std::stringstream out;
out << i;
s = out.str();

Pages: [1]
anything