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

Pages: [1] 2
1
System / sfml on 64bit archetecture
« on: September 08, 2010, 12:07:42 pm »
I'll look in msvc++ to see if there is an option to build for 32bit.
If it's more involved than that though perhaps you might throw me some tips.
Thanks for the reply at any rate.

2
System / sfml on 64bit archetecture
« on: September 07, 2010, 11:59:27 am »
Does sfml work on 64bit computers....
I have an acer with windows 7 inhstalled and the setup tutorial program crashs on startup.

Code: [Select]

#include <cstdlib>
#include <iostream>

#include <SFML/System.hpp>

int main()
{
sf::Clock Clock;
    while (Clock.GetElapsedTime() < 50.f)
    {
        std::cout << Clock.GetElapsedTime();
        sf::Sleep(0.5f);
    }

    system("pause");
    return 0;
}


Never had this problem on xp!

3
General / stupid errors :(
« on: May 29, 2010, 04:13:19 pm »
Have you added SFML_DYNAMIC in the options to the preprosser difinitions.
Well I had a similar error under vc++ 2005 until I added that macro.

4
General discussions / getting colour from a sprite?
« on: May 12, 2010, 07:35:12 am »
Ahh,thats just what I am after.
Thank you very much.

5
General discussions / getting colour from a sprite?
« on: May 12, 2010, 06:11:50 am »
Hi fella's.

Still using v1.5.
I need to iterate through a large (1024x640) sprite (it's a map)
and test the colour of each pixel.
If it's green I insert FOREST into a matrix, black is MOUNTAIN etc.

So...I have found a GetPixel and GetColor method but I am at a loss how to use them.

Could someone give me a helping hand please?

6
Graphics / Text in subwindow not showing.
« on: August 29, 2009, 11:55:11 am »
Sorry,a logical error of mine.
Feel free to delete this post since it's misleading.

7
Graphics / Text in subwindow not showing.
« on: August 29, 2009, 11:19:12 am »
Okay here's a test code I wrote,
no text is being output to the subwindow (mode_window)
and I don't know why?

See the bottom of this post for the main loop and
you should have no problem understanding whats going on.

oss       - a globally defined ostringstream
mode[] - bool mode[ NUMBER_OF_MODES ]

Code: [Select]

void Display::set_mode (const int which)
{
    mode[which] = (mode[which] ? false : true);

    if (which == MODE_INSPECT)
    {
        if (mode[which])
        {
            mode_window.Create( sf::VideoMode(256, 192,32), "",
                                                                   sf::Style::None);
            populate_mode_window();
        }
        else
        {
            mode_window.Close();
        }
    }
}

Code: [Select]

void Display::populate_mode_window()
{
    sf::String text("", font);
    text.SetColor( sf::Color( 250, 234, 200 ));
    text.SetSize( 10.0 );

    mode_window.Clear( sf::Color(0, 0, 255) );

    oss << "Can I see this text!";
    text.SetText( oss.str() );
    oss.str("");

    mode_window.Draw( text );
    mode_window.Display();
}

++++++++++++ Main.cpp +++++++++++++
Code: [Select]

display.set_mode( MODE_INSPECT );

while (App.IsOpened())
{

    while (display.mode_window.IsOpened())
    {
        while (display.mode_window.GetEvent(display.Event))
        {
            if ((display.Event.Type == sf::Event::KeyPressed)
            && (display.Event.Key.Code == sf::Key::L))
            { // This will close the mode_window
                display.set_mode( MODE_INSPECT );
break;
            }
        }
    }

    // Main window operations here ......
}

8
Window / Show FPS In Title Bar Window
« on: August 24, 2009, 08:20:43 am »
It sounds like a neat idea though having an fps counter in the titlebar.

You could create an sf::RenderWindow without a titlebar,
then blit your image of a titlebar to the top of the screen every frame while also outputing an sf::String anywhere in that titlebar.

(just a thought).

9
Graphics / Is sprite.FlipX() set to false on sprite.SetImage();
« on: August 16, 2009, 05:04:08 pm »
My sprite runs through a loop every few frames
that advances the frame counter and then sets the new
image for that frame to the same sprite.
Code: [Select]

// sf::Image frame[ MAX_FRAME ];
sprite.SetImage( frame[ frameCounter++ ] );


It seems to me that if I pass true to sprite.FlipX(),
once the sprite.SetImage() call comes the boolean returns to false.

Either that or I'm messing up somewhere.
Is sprite.FlipX( bool ) set to false whenever sprite.SetImage( image )
is called?

Thx.

10
Graphics / Can't Use sf::Strings.
« on: July 04, 2009, 05:47:54 am »
Maybe this is the sfml sf::String bug.

If it is have you tried explicitly assigning a font to the string,
like...


Code: [Select]

sf::Font font;
font.LoadFromFile( "fonts directory" );

sf::String s("", font);



I think thats right anyway.

If your program is crashing during runtime and not on exit though,
chances are it's a programming error.

11
General / Failed to change to fullscreen
« on: July 02, 2009, 05:11:05 am »
As well as Laurents last question,I'll add that I
had a similer but not the same problem when I ran sfml in fullscreen mode when my screens resolution was 1280x720.

The sfml window would be totally invisable.
So I put it back on 1024x768 and it worked normally.

12
General / Can you help me with sprite sheets?
« on: July 01, 2009, 04:46:22 pm »
Okay great,thanks Laurent.

13
General / Can you help me with sprite sheets?
« on: July 01, 2009, 04:30:54 pm »
What are the sfml routines for taking images from a sprite sheet,
I'm sure it's something to do with the rect routine,
but I'm not sure and it doesn't specifically say anywhere.

Never used sprite sheets before,always single images for the sprites.

Please help!

14
Graphics / Effects error msg to std::cerr that I don't understand!
« on: April 29, 2009, 06:47:05 am »
One other question then,

Is there any point using post effects if I can only utilise one image.
What could I do with one image,anything remotely eye catching???

15
Graphics / Effects error msg to std::cerr that I don't understand!
« on: April 28, 2009, 04:43:40 pm »
Thanks,I mean damit,I wish I wasn't so damn poor.

Sirt.

Pages: [1] 2
anything