SFML community forums

Help => General => Topic started by: Sonic-blue-knight on February 25, 2009, 07:25:28 pm

Title: Some SFML programming issues
Post by: Sonic-blue-knight on February 25, 2009, 07:25:28 pm
Alright, I'm about to start learning SFML, but I'd like to know some things :)

Sprite.SetSubRect(sf::IntRect(10, 10, 20, 20));
1. For making animations I just can only use that? (I mean, that's the easiest way isn't it?)
2. How can I protect my resources and make them be read by SFML? (Changing it's format and so)
3. Is it possible to hide the resources inside of the .exe and also being read from there?
4. Does SFML have a function to set the sound position? (Time position).

Thanks in advance. (oh yeah, wiki's links are broken)
Title: Some SFML programming issues
Post by: Laurent on February 25, 2009, 07:51:47 pm
1. Yes
2. A simple solution is to put all your resources in a big data file. There's some code on the wiki to create and read such files.
3. Only on Windows, so that's not implemented in SFML. But my answer to question 2 already gives a portable solution for this ;)
4. Yes

Quote
wiki's links are broken

Which ones?
Title: Some SFML programming issues
Post by: Sonic-blue-knight on February 25, 2009, 07:55:11 pm
there are some in http://www.sfml-dev.org/wiki/en/sources

Also, I'd like to thank you for that quick reply! :3
Greetings!
Title: Some SFML programming issues
Post by: Astrof on February 25, 2009, 08:43:50 pm
wait, so you can set the sound's time position (make it play from a certain spot)?

EDIT: found it, SetPlayingOffset yay.
Title: Some SFML programming issues
Post by: Laurent on February 25, 2009, 08:53:59 pm
Quote
there are some in http://www.sfml-dev.org/wiki/en/sources

I tested all of them, they're ok. Which ones are not working for you?
Title: Some SFML programming issues
Post by: Sonic-blue-knight on February 25, 2009, 08:56:00 pm
http://www.sfml-dev.org/wiki/en/sources/frame_anim_animated

That one with the link, doesn't work
Show's a message in French apologizing.
Title: Some SFML programming issues
Post by: Laurent on February 25, 2009, 10:22:54 pm
Ok I see, thanks :)