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.


Messages - virus

Pages: [1]
1
General / Handling time?
« on: October 18, 2010, 11:03:53 pm »
Hello,

I would like to remember that is impossible to explain my problem without comparing SFML and Allegro.

In Allegro i can set a timeout and a function is called everytime this timeout is reached. Can I do that in SFML?

I mean, when you are building a game, you can't just have a complex full time runtime, controlling execution with "sf::Sleep"...

What is the best way to separate TIME HANDLING from the rest of the game?

I would like to create a timeline of functions to be executed, with ticks (40 each second), how can I do that?

If its not possible, again, what is the best way to control time?

Thank you :)
(I am sorry, it is kinda confusing)

2
General / SOLVED Ubuntu + Code::Blocks + SFML = cannot find libraries?
« on: October 17, 2010, 04:28:48 am »
Ooohh!!! Everything working fine now!!

Thanks a LOT!!

3
General / SOLVED Ubuntu + Code::Blocks + SFML = cannot find libraries?
« on: October 17, 2010, 03:52:40 am »
Could someone post a how-to with SFML + Code::Blocks + Ubuntu?
It would be WAY HELPFUL not just for me...

Thanks again (:

4
General / SOLVED Ubuntu + Code::Blocks + SFML = cannot find libraries?
« on: October 17, 2010, 03:51:12 am »
Thanks for the tip!
I installed it from Ubuntu Software Center and this problem was solved.

However, now I am getting errors in a lot of functions...

Code: [Select]
obj/Debug/audio.o||In function `carregar(char*)':|
/home/user/Desktop/Backup/Projects/Project1/audio.cpp|41|undefined reference to `sf::SoundBuffer::LoadFromFile(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'|
obj/Debug/audio.o||In function `tocar(int, float, float, bool)':|
/home/user/Desktop/Backup/Projects/Project1/audio.cpp|72|undefined reference to `sf::Sound::SetBuffer(sf::SoundBuffer const&)'|
/home/user/Desktop/Backup/Projects/Project1/audio.cpp|73|undefined reference to `sf::Sound::SetVolume(float)'|
/home/user/Desktop/Backup/Projects/Project1/audio.cpp|74|undefined reference to `sf::Sound::SetPitch(float)'|
/home/user/Desktop/Backup/Projects/Project1/audio.cpp|75|undefined reference to `sf::Sound::SetLoop(bool)'|
/home/user/Desktop/Backup/Projects/Project1/audio.cpp|76|undefined reference to `sf::Sound::Play()'|
obj/Debug/audio.o||In function `tocar(int)':|
/home/user/Desktop/Backup/Projects/Project1/audio.cpp|97|undefined reference to `sf::Sound::SetBuffer(sf::SoundBuffer const&)'|
/home/user/Desktop/Backup/Projects/Project1/audio.cpp|98|undefined reference to `sf::Sound::SetVolume(float)'|
/home/user/Desktop/Backup/Projects/Project1/audio.cpp|99|undefined reference to `sf::Sound::SetPitch(float)'|
/home/user/Desktop/Backup/Projects/Project1/audio.cpp|100|undefined reference to `sf::Sound::SetLoop(bool)'|
/home/user/Desktop/Backup/Projects/Project1/audio.cpp|101|undefined reference to `sf::Sound::Play()'|
obj/Debug/audio.o||In function `tocar_instancia(int)':|
/home/user/Desktop/Backup/Projects/Project1/audio.cpp|113|undefined reference to `sf::Sound::Play()'|
obj/Debug/audio.o||In function `tocar_instancias(int)':|
/home/user/Desktop/Backup/Projects/Project1/audio.cpp|127|undefined reference to `sf::Sound::Play()'|
obj/Debug/audio.o||In function `pausar(int)':|
/home/user/Desktop/Backup/Projects/Project1/audio.cpp|142|undefined reference to `sf::Sound::Pause()'|
obj/Debug/audio.o||In function `pausar_instancias(int)':|
/home/user/Desktop/Backup/Projects/Project1/audio.cpp|157|undefined reference to `sf::Sound::Pause()'|
obj/Debug/audio.o||In function `parar(int)':|
/home/user/Desktop/Backup/Projects/Project1/audio.cpp|172|undefined reference to `sf::Sound::Stop()'|
obj/Debug/audio.o||In function `parar_instancias(int)':|
/home/user/Desktop/Backup/Projects/Project1/audio.cpp|188|undefined reference to `sf::Sound::Stop()'|
obj/Debug/audio.o||In function `ajustar(int, float, float)':|
/home/user/Desktop/Backup/Projects/Project1/audio.cpp|205|undefined reference to `sf::Sound::SetVolume(float)'|
/home/user/Desktop/Backup/Projects/Project1/audio.cpp|208|undefined reference to `sf::Sound::SetPitch(float)'|
obj/Debug/audio.o||In function `ajustar_instancias(int, float, float)':|
/home/user/Desktop/Backup/Projects/Project1/audio.cpp|225|undefined reference to `sf::Sound::SetVolume(float)'|
/home/user/Desktop/Backup/Projects/Project1/audio.cpp|228|undefined reference to `sf::Sound::SetPitch(float)'|
obj/Debug/audio.o||In function `estado(int)':|
/home/user/Desktop/Backup/Projects/Project1/audio.cpp|254|undefined reference to `sf::Sound::GetStatus() const'|
/home/user/Desktop/Backup/Projects/Project1/audio.cpp|256|undefined reference to `sf::Sound::GetStatus() const'|
obj/Debug/audio.o||In function `atualizar()':|
/home/user/Desktop/Backup/Projects/Project1/audio.cpp|286|undefined reference to `sf::Sound::GetStatus() const'|
obj/Debug/audio.o||In function `audio_buffer':|
/home/user/Desktop/Backup/Projects/Project1/audio.hpp|4|undefined reference to `sf::SoundBuffer::SoundBuffer()'|
obj/Debug/audio.o||In function `audio_audio':|
/home/user/Desktop/Backup/Projects/Project1/audio.hpp|10|undefined reference to `sf::Sound::Sound()'|
||=== Build finished: 26 errors, 0 warnings ===|

5
General / SOLVED Ubuntu + Code::Blocks + SFML = cannot find libraries?
« on: October 16, 2010, 11:49:00 pm »
Linker Settings:

Other Linker Options:

-lsfml-graphics
-lsfml-window
-lsfml-system




I think would be great to do a tutorial not just for windows... I mean, there is "MinGW", and it is just for Windows cause MinGW is actually a simulation of gcc from linux :P

6
General / SOLVED Ubuntu + Code::Blocks + SFML = cannot find libraries?
« on: October 16, 2010, 11:34:51 pm »
I have unpacked it, and it is on my personal folder. On Code::Blocks i have followed the Code::Blocks tutorial on SFML webpage.

(Setting up stuff on Compiler & Debugger)

7
General / SOLVED Ubuntu + Code::Blocks + SFML = cannot find libraries?
« on: October 16, 2010, 11:24:14 pm »
Standard... The actual version i believe 1.6...

I just downloaded it from the website (http://downloads.sourceforge.net/sfml/SFML-1.6-sdk-linux-64.tar.gz)...

8
General / SOLVED Ubuntu + Code::Blocks + SFML = cannot find libraries?
« on: October 16, 2010, 11:07:24 pm »
Hello,

I am running on Ubuntu 10.10, and I am getting this errors:

ld||cannot find -lsfml-graphics|
ld||cannot find -lsfml-window|
ld||cannot find -lsfml-system|
||=== Build finished: 3 errors, 0 warnings ===|


Do any of you know how to solve it?

Thanks!

9
Audio / struct + sf::Music + malloc = error (?)
« on: September 11, 2010, 04:26:01 am »
I did it!

SoundBuffer + Sound

Thanks for helping :)

10
Audio / struct + sf::Music + malloc = error (?)
« on: September 11, 2010, 01:39:44 am »
There is no other way? It is too slow and heavy.

Afterall, i cannot know how many times will i have to play the same song simultaneously :/

11
Audio / struct + sf::Music + malloc = error (?)
« on: September 11, 2010, 01:17:30 am »
What about playing the same music 2 times at almost the same time without stopping the first?

I mean, i am playing a music, and then I want it to start again, without stopping the first music to play, so it starts again and the same music is playing in 2 different positions.

How can I do that?

12
Audio / struct + sf::Music + malloc = error (?)
« on: September 11, 2010, 01:02:31 am »
It worked o.o"

Such an easy solution!

Thanks a LOT! :P

13
Audio / struct + sf::Music + malloc = error (?)
« on: September 11, 2010, 12:27:03 am »
Hello!

I am trying to have sf::Music into a dynamic list (struct below):

typedef struct sound{
    sf::Music audio;
    char *name;
    struct sound *next;
}sound;

When I declare:

sound test;
test.audio.OpenFromFile("music.ogg");
test.audio.Play();

it works.

But when I do:

sound *test;
test = (sound*)malloc(sizeof(sound));
test->audio.OpenFromFile("music.ogg");
test->audio.Play();

It doesn't work.

(I know, I am no treating the char stuff, but i just didn't post it here...)

Why doesn't it work?

Pages: [1]
anything