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 - Tenry

Pages: 1 ... 6 7 [8]
106
General / How to link SFML statically (GCC/MinGW)?
« on: August 13, 2010, 03:48:56 pm »
Quote from: "Dig"
the static libraries have -s at the end of their name,

so maybe:

Code: [Select]
g++ main.cpp -o test.exe -lsfml-window-s -lsfml-system-s

would work?

That doesn't work. Compiling a little program using sf::Clock gives me the following errors:
Code: [Select]
/mingw/lib/libsfml-system-s.a(Clock.o):Clock.cpp:(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
And some more undefined references.

Btw, where is it documented / "told" me about the usage with "-s", and "-d" after lib name? Does d mean "debug"?

107
General / How to link SFML statically (GCC/MinGW)?
« on: August 13, 2010, 01:55:38 am »
I use MinGW (GCC) on Windows Vista and I don't use a real IDE. I always either type the commands on the command line or I create makefiles.

When compiling and linking a project, it might look something like this:
Code: [Select]
g++ main.cpp -o test.exe -lsfml-window -lsfml-system
In this case test.exe will always need the required DLLs of SFML (e.g. sfml-system.dll).

By searching in the internet I thought -static would be the solution:
Code: [Select]
g++ main.cpp -o test.exe -static -lsfml-window -lsfml-system
But also this result needs the DLLs.

I'm wondering how, if it is possible at all, I can link against the static sfml libraries.  :(

108
Feature requests / Set Music Loop-Points (Start/End)
« on: August 11, 2010, 05:21:18 pm »
Quote from: "Laurent"
Of course, you can as well use another library for audio, if you want something much more complete and high-level, there are very good libraries such as BASS or FMod.

Okay. BASS is by the way my favorite audio library, it's really cool :)

109
Feature requests / Set Music Loop-Points (Start/End)
« on: August 11, 2010, 03:48:31 pm »
Quote from: "Laurent"
This code works only with SFML 2. I don't think it is possible to implement the same thing in SFML 1, due to the lack of the OnSeek callback.

It also requires a minor modification in the sf::Music class (change the access of these virtual functions from private to protected); I'l officially change this as soon as possible.

I don't know if this class does everything that you want, but at least now you have some code to play with ;)

So I either have to wait for SFML 2, or I have to use a different library, or I have to compile a pre-version of SFML 2 myself if it is already fully implemented in the version?

110
Feature requests / How to do special loop with sf::Music?
« on: August 11, 2010, 02:22:45 am »
Quote from: "Laurent"
Quote
I hope that it will be in the next version and I hope it's coming soon. Otherwise I might think of using a different library or try to "solve" it with a custom audio stream...

It is already possible, you can inherit from sf::Music and hack into the virtual functions to do what you want.

Looking at the source of Music.hpp I don't really understand how I can do that.
How may I get sample data from the loaded (ogg) file without directly playing the file and instead putting the samples in a custom buffer until a certain (loop) point?
Could you maybe show me a little example please?

111
Feature requests / Move Window BEFORE Appearing
« on: August 09, 2010, 05:32:04 pm »
Quote from: "Laurent"
Do you really need this feature? I think it was good 20 years ago when video memory was counted in KB, but now with the gigabytes of memory available, who cares?

I just really like it  :roll:

112
Feature requests / Move Window BEFORE Appearing
« on: August 08, 2010, 10:40:50 pm »
Quote from: "Laurent"
Nothing is really hard to implement in SFML ;)

Nothing? So what's about 8-bit sprites, sprites having palettes so that I can switch between them easily without needing much memory?

I was planning a game with a different library using some of those sprites, and now I found SFML. But it doesn't seem to have such a feature. :(

113
Quote from: "Hiura"
A modal window ? You can do it this way : if win1 lost the focus and win2 grab the focus then set win1 as active.

But I still need the focus on win2. Maybe I want to freeze the game while focusing win2.
And in addition, I don't think so that SFML has window focus functions, or I just don't know it has.

Quote from: "Spodi"
Sounds more like something you should look for in your programming language of choice and not SFML.

It does not have to do with the programming language.
There is WinAPI for Windows and X11 for Linux doing it.

114
What's about the feature to choose a parent of a new window? I think that could be useful if I had a main game window and a debug window, which I'd like to be always above the main window.

115
Feature requests / Move Window BEFORE Appearing
« on: August 08, 2010, 04:00:57 pm »
I think it's also quite easy to implement as looking in the source in the Win32 part.

116
Feature requests / Move Window BEFORE Appearing
« on: August 07, 2010, 11:53:45 pm »
Why can't I move the window before it appears on the screen? I'd like to create a window being at a certain position, but when creating the window it is centered first. When using SetPosition() immetiately after creating I still might see flashing the window on the screen center for a very short moment. That is annoying.

I don't want to use WinAPI or something to create the window at the prefered position.

So, what's about the feature either to choose window position on creating function or creating window hidden first to move it somewhere for example?

117
Feature requests / Set Music Loop-Points (Start/End)
« on: August 04, 2010, 03:43:54 pm »
Quote from: "Laurent"
Quote
so will it be round down to 1,111,110?

No, we'd rather round to the nearest and get the correct value.

Okay. But I would still prefer integers to floats  :roll:

118
Feature requests / Set Music Loop-Points (Start/End)
« on: August 03, 2010, 11:12:50 pm »
Quote from: "Laurent"

Quote
Also I often see floats in the lib where other types (e.g. ms for the time, samples for sound) could be use. Could you maybe add support for non-float values for such things?

I agree that unsigned integers are better for storing time in milliseconds ;)

So, why don't I see any possibilites of using ms (or e.g. 1/1000000 secs)? ^^

Quote from: "Laurent"

Quote
To get looping a stream very precisely it would be good to pass the sample number and not a float, in my opinion.

I understand, but I still don't think that in this particular context you would loose precision with floats. If I'm wrong please provide more detailed arguments :)

I have got a simple example:
Let's assume, the sound does have 3,333,333 samples. Loop start might be 1,111,111. If I'd calculate the seconds, it would be 1/3 or the song length (let's assume 100 secs), the the float value will be about 33.333333. When I calculate 33.333333/100*3,333,333, I would get 1,111,110.989, so will it be round down to 1,111,110?

119
Feature requests / Set Music Loop-Points (Start/End)
« on: August 03, 2010, 08:45:26 pm »
Quote from: "Laurent"
There are lots of topics about this feature. I'm currently working on it.

I hope that it will be in the next version and I hope it's coming soon. Otherwise I might think of using a different library or try to "solve" it with a custom audio stream...

Quote from: "Laurent"

Quote
And please, if this feature will be added, it should be possible to set it with sample number and not only in seconds using float

May I ask why? I don't think that you loose precision with floats.
And I assume that most people will give loop points in time, not samples. But maybe I'm wrong, I didn't get much feedback yet.
Anyway, you can always calculate one from the other.

I usually don't like floats and doubles very much.
To get looping a stream very precisely it would be good to pass the sample number and not a float, in my opinion.
Also I often see floats in the lib where other types (e.g. ms for the time, samples for sound) could be use. Could you maybe add support for non-float values for such things?

120
Feature requests / Set Music Loop-Points (Start/End)
« on: August 03, 2010, 07:04:11 pm »
It should be possible to set loop points on music. I have got some music where it would be good if not the whole song is looped, but just a part of it. And please, if this feature will be added, it should be possible to set it with sample number and not only in seconds using float.

Pages: 1 ... 6 7 [8]