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

Pages: 1 ... 31 32 [33] 34
481
General discussions / SFML Main
« on: October 14, 2009, 02:25:56 am »
I think the problem might be the "extern" in the main declaration. Put all of that code after your main function and then remove the "extern int main( int argc, char* argv[] );" line.

482
Window / No title bar on RenderWindow
« on: October 10, 2009, 06:23:00 am »
Quote from: "racumin"
Hi, for now, I think the call to GetEvent is not neccessary. From the link above, you can see in its screenshot that there is a window with black background and a title bar with the "iiiiSkipBo" text. There is also a minimize, maximize and close buttons. When I ran this program in Ubuntu, it produces some black pixels with no window at all.

If I am wrong, please correct me. If I need to call the GetEvent, what will I do there? Is it something like
Code: [Select]

    while (App.GetEvent(Event))
    {
        if (Event.Type == sf::Event::window_opened??)
            //display titlebar here
    }


Thanks!
No, you don't have to explicitly draw the Titlebar. Otherwise Laurent wouldn't have complaints about not being able to change the Titlebar every once in a while. XD

If you don't want to handle any events, just use this:
Code: [Select]
while (App.GetEvent(&Event)) // The & is required so that you don't get Memory Leaks and can actually use the Event variable
{
}

That way, the Window Event Queue won't overflow, you don't use any of the events, and the Window works properly. However, if you want the "X" button on the Titlebar to work, you will have to add a little event handling to the window.

483
Python / Getting mouse coordinates. Possible bug?
« on: October 03, 2009, 02:48:49 am »
You're probably using an unsigned number, because the number you say it jumps to is the maximum unsigned integer value in C++, but it would also be equal to -1 if you used a signed number.

484
Graphics / sf::RenderWindow.Capture is gone?
« on: September 26, 2009, 04:24:15 am »
Quote from: "Lokk"
You should use Image::CopyScreen.
Thank you!

485
Graphics / sf::RenderWindow.Capture is gone?
« on: September 26, 2009, 02:08:43 am »
What just happened? I updated to the latest SFML2 Build, and now there's no more sf::RenderWindow.Capture(). Is there a reason you removed it? I can't find anything else for Capturing RenderWindows in the Documentation, and I need it for my freezeframe Message Box.

486
Audio / Crashing after "Failed to open the audio device".
« on: August 30, 2009, 10:16:58 am »
I'd just like to say that although I'm not getting this error, my friend is getting it when he tries to run the exact same Application. Yes, I sent him all of the files and DLLs. As soon as he runs the program, it crashes and the Console says "Failed to open the Audio Device". He's running Vista and I'm running Win7, and he just updated all of his drivers and it still doesn't work. The Application uses the Static Version of the latest build of SFML2. I tried replacing the DLLs, and it still doesn't work for him.

487
Graphics / image tearing???
« on: August 28, 2009, 03:15:10 am »
Quote from: "Dinocool"
VSYNC is on, as is frame limit 60 fps

i tried disabling vsync, then frame limit, and then frame limit AND vsync to no avail
You can't have both Framerate Limit and VSync on at the same time.

488
Graphics / VSync fixes Tearing
« on: August 27, 2009, 12:41:41 am »
Tearing is usually caused by the Game trying to update the screen while the screen is already updating. Try enabling VSync through the Window Class.

489
Audio / SFML Audio 1.5 WAV File Not Playing
« on: August 17, 2009, 12:59:09 am »
I found the problem. libsndfile-1.dll was outdated by 2 years. :|

490
Audio / SFML Audio 1.5 WAV File Not Playing
« on: August 16, 2009, 05:38:36 am »
Quote from: "Laurent"
Quote
Wait, what syntax errors? That's a stripped down version of the code I'm using.

OpenFromFile is a member of sf::Music, not sf::SoundBuffer.
SFX.Playing is a constant, so you get an endless loop (ok, this is not really a syntax error).

Quote
there's still the problem of Audio thinking my OGG Vorbis Audio files are corrupt.

So I guess they are. SFML 2.0 uses the official ogg/vorbis libraries, whereas in 1.5 it was an implementation written from scratch (not by me).
Ack, why do I make so many mistakes?!
I guess Audacity 1.3.8 doesn't correctly support OGGs, cause that's what I'm using to create them. :\ I wonder if there are any fixes.

491
Audio / SFML Audio 1.5 WAV File Not Playing
« on: August 15, 2009, 02:35:52 am »
Quote from: "Laurent"
Well, a code that you actually tried would be more useful (this one doesn't even compile, and throws lots of messages when you fix the syntax errors).

This one works perfectly:
Code: [Select]
#include <SFML/Audio.hpp>

int main()
{
    sf::SoundBuffer Sound;
    Sound.LoadFromFile("jump.wav");

    sf::Sound SFX(Sound);
    SFX.Play();

    while(SFX.GetStatus() == sf::Sound::Playing)
    {
    }

    return EXIT_SUCCESS;
}


-> Don't do anything outside main()
-> Don't pass the buffer to the sound before loading the sound file
Wait, what syntax errors? That's a stripped down version of the code I'm using.

Anyways, I did what you said and it works now, but there's still the problem of Audio thinking my OGG Vorbis Audio files are corrupt.

492
Audio / SFML Audio 1.5 WAV File Not Playing
« on: August 14, 2009, 09:48:44 pm »
Code: [Select]
#include <SFML/Audio.hpp>

sf::SoundBuffer Sound;
sf::Sound SFX(Sound);

int main()
{
 Sound.OpenFromFile("Resources/SFX/Jump.wav");
 SFX.Play();
 while(SFX.Playing)
 {
 }
 return EXIT_SUCCESS;
}


Sound inside the folders: http://www.mediafire.com/?owkkttdztzn
Link with Audio and System.
BTW, I tried the latest SVN Repository version and tried to statically link: Now my OGG files are being called "malformed". They worked before in SFML 1.5, so I dunno what's wrong. The WAV still doesn't work in the SVN sfml2 Version either.

493
Audio / SFML Audio 1.5 WAV File Not Playing
« on: August 14, 2009, 06:12:19 am »
I have tried everything, including resetting the buffer when I load a sound. The Console isn't telling me anything that could be causing the problem, either. Currently I am using:
Sound.LoadFromFile("Resources/SFX/Jump.wav");
                SFX.SetBuffer(Sound);
                SFX.Play();
Yes, I have confirmed that the file exists. SFX was initialized as sf::Sound SFX(Sound), and Sound IS a SoundBuffer. Could it be a problem with the file itself?

494
General / Tutorial Issue: Using Render Windows
« on: August 08, 2009, 08:12:41 am »
Quote from: "Zauren"
system wasn't in since it wasn't needed, but I stuck it in anyway to be sure. Same error. Dynamic is also set, that was the first thing I tried.

Oh god, I see what the issue was. I WAS compiling in debug without the -d libraries using 'start without debugging', because for all my time with Visual Studio that's how I tested the program instead of building it.

...I toldja it was something stupid! Many thanks!
I'm sorry, but reading the tutorials for setting up, it says that the Window Library depends on the System Library, meaning you cannot use the Window Library without the System Library. So how is it that you are able to run it without System?

495
Graphics / SFML 1.4: SetScaleX does not appear to be working
« on: August 07, 2009, 07:32:57 pm »
But I don't GET a Standard Error Output. Maybe if I compile my Program as a Console App, the STDERR will show up in the console?

Anyways, I didn't use FlipX because I assumed it would flip it every frame(I had a problem like that in SDL, as in, FlipX(true) will make it face left one frame then right the next), but I guess that was a stupid assumption. It works! Thank you for your help!

Pages: 1 ... 31 32 [33] 34