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.


Topics - MisterKpak

Pages: [1]
1
System / Elapsed time: MIA
« on: November 22, 2012, 03:17:41 am »
I'm not sure if this has been brought up before, but whatever happened to the getElapsedTime() feature in 2.0? Are there any equivelant functions?

2
I'm getting kinda mad at sfml 2.0. I set up my sprite stuff JUST LIKE the Docs said to. and i get "error: no matching function call for (sf::Sprite::Sprite(sf::Image&)

here's my code.

#include <SFML/System.hpp>
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
#include <cstdio>
#include <cstdlib>
#include <iostream>

int main(int argc, char**argv)
{
    sf::RenderWindow app(sf::VideoMode(800,640), "Sfml works!");
    sf::Text text("Welcome to SFML 2.0");
    text.setPosition(400,320);

    sf::Image terrain;
    if(terrain.loadFromFile("terrain.png"))
    {
        return EXIT_FAILURE;
    }


    sf::Sprite grass(terrain);
    grass.setTextureRect(IntRect(0,0,45,45);
    grass.setX(100,100);
    while(app.isOpen())
    {


        sf::Event Event;
        while(app.pollEvent(Event))
        {
            if(Event.type == sf::Event::Closed)
            {
                app.close();
            }
        }

    app.clear();
    app.draw(grass);
    app.draw(text);

    app.display();
    }
    return 0;
}
 

3
General / Compiling a project with C::B
« on: May 20, 2012, 03:40:23 pm »
Hello.

When compiling with Code::Blocks, is it normal to get 20+warnings about a class having pointer members?

Thanks for your help :D

Pages: [1]