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

Pages: [1] 2 3
1
Audio / Re: sf::Music Segmentation fault
« on: August 13, 2013, 12:12:56 am »
it has some solution?

2
Audio / Re: How i can install sfml-audio 2.1?
« on: August 12, 2013, 10:49:06 am »
this error happens when I call sf::Music

3
Audio / Re: AW: How i can install sfml-audio 2.1?
« on: August 11, 2013, 10:42:21 pm »
By reading and following the tutorial step by step (don't just look at pictures). ;)
ok ty but i have other problem.


4
Audio / How i can install sfml-audio 2.1?
« on: August 11, 2013, 09:58:03 pm »
How i can install sfml-audio?
to use "sf::Music"  jumps this msg:

c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.1\..\..\..\libsfml-audio-s.a(SoundStream.cpp.obj):SoundStream.cpp|| undefined reference to `sf::Thread::wait()'|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.1\..\..\..\libsfml-audio-s.a(SoundStream.cpp.obj):SoundStream.cpp|| undefined reference to `sf::Thread::~Thread()'|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.1\..\..\..\libsfml-audio-s.a(SoundStream.cpp.obj):SoundStream.cpp|| undefined reference to `sf::Thread::~Thread()'|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.1\..\..\..\libsfml-audio-s.a(SoundStream.cpp.obj):SoundStream.cpp|| undefined reference to `sf::Thread::wait()'|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.1\..\..\..\libsfml-audio-s.a(SoundStream.cpp.obj):SoundStream.cpp|| undefined reference to `sf::Thread::~Thread()'|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.1\..\..\..\libsfml-audio-s.a(SoundStream.cpp.obj):SoundStream.cpp|| undefined reference to `sf::Thread::~Thread()'|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.1\..\..\..\libsfml-audio-s.a(SoundStream.cpp.obj):SoundStream.cpp|| undefined reference to `sf::Thread::wait()'|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.1\..\..\..\libsfml-audio-s.a(SoundStream.cpp.obj):SoundStream.cpp|| undefined reference to `sf::Thread::launch()'|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.1\..\..\..\libsfml-audio-s.a(SoundStream.cpp.obj):SoundStream.cpp|| undefined reference to `sf::Thread::launch()'|
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.1\..\..\..\libsfml-audio-s.a(SoundStream.cpp.obj):SoundStream.cpp|| undefined reference to `sf::Thread::wait()'|
||=== Build finished: 10 errors, 1 warnings (0 minutes, 0 seconds) ===|

5
Graphics / Re: RenderTexture won't clear properly
« on: July 03, 2013, 05:48:58 pm »

    RenderTexture.clear(sf::Color(255,255,255,0));

6
SFML projects / Re: AW: Re: Colonies - A Retro Sandbox Survival MMO
« on: June 21, 2013, 12:25:53 am »
I WANT THAT SOURCE !!!
People that can't ask politely should never get anything. ;)
i a joke, this proyect is very good!

7
SFML projects / Re: Colonies - A Retro Sandbox Survival MMO
« on: June 20, 2013, 11:48:16 pm »
I WANT THAT SOURCE !!!

8
I want real size of sf::Text


thanks for any inconvenience

SOLVED
f::Font font;
    font.loadFromFile("./data/fonts/arial.ttf");
    int linespacing = font.getLineSpacing(sfText->getCharacterSize());
    int lengthstring=0;
    int t;
    ifstream file("./data/text/text1.txt");
    texto.clear();
    for(;file.eof()==false;){
        string t1;
        file >> t1;
        texto = texto+t1+' ';
    }
    for(int i=0;i<texto.length();i++){
        t=font.getGlyph(texto[i], 18, false ).advance;
        lengthstring = lengthstring + t;
        if(lengthstring>=500){
            lengthstring = 0;
            for(int j=i;j>0;j--){
                if(texto[j]==' '){
                    texto.replace(j,1,"\n");
                    i=j;
                    break;
                }
            }
        }
        cout << i  << "-" << (int)texto[i] << "-" << t  << endl;
    }
    sfText->setString(texto);
    cout << "tamaƱos: "<<  lengthstring << endl;
    isChange=true;

9
Lauren, I'm not clear what I should do. :(

combinated transform of the object
------------------------
1
0
0
0
-0
1
0
0
0
0
1
0
0
0
0
1
----------INVERSE--------------
1
-0
0
0
0
1
0
-0
0
0
1
0
-0
-0
0
1
------------------------

10
ok thank you,I'll investigate what you say

11
I don't find the problem with the size of "sf :: Text :: findCharacterPos"
I'm trying to get the sf :: text makes a line break when the text arrives to the size of 500

Here an image:


Here code
void Text::setText(string texto){
    isChange=true;
    sfText->setString(texto);
    string t1=texto;
    int newline=500;
    for(int i=0;i< t1.size();i++){
        if(sfText->findCharacterPos(i).x>newline){
            t1 = sfText->getString();
            for(int j=i;j>0;j--){
                if(t1[j]==' '){
                    cout <<  sfText->findCharacterPos(j).x << "-" << newline<< "-" << t1[j+1] <<endl;
                    i=j+1;
                    t1.insert(j,"\n");
                    sfText->setString(t1);
                    break;
                }
            }
        }
    }
}

GL

12
Graphics / Re: how i can extract the size of sf::Text?
« on: March 27, 2013, 11:03:39 pm »
From the width and height members of sf::Text::getGlobalBounds().
Thank You.
Right now i am testing that.

13
Graphics / how i can extract the size of sf::Text?
« on: March 27, 2013, 10:40:40 pm »
how i can extract the size of sf::Text?
i think maybe i can extract the size with sf:Glyph but is hard :) i dont know use that.
I need it size for create a sf::RenderTexture.

14
SFML projects / Re: Platform - The simple platformer game
« on: March 27, 2013, 06:20:36 pm »
Se ve bien =D

it is look good

Pages: [1] 2 3
anything