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

Pages: [1]
General / Add files to SFML
« on: January 24, 2009, 07:45:09 pm »

This is basically what I want to do:
Code: [Select]

#include <SFML/System.hpp>

int main()
    sf::AClock Clock;

    //Do something with clock

    return 0;

I want to add AClock.hpp and AClock.cpp to the System.hpp.
I have never done that before and I can't get it to work.
I'm using SFML v1.4 and CodeBlocks with MinGW on Windows XP.

I have tried a bit but I keep getting this error message "undefined reference to `sf::AClock::AClock(bool)'"

Any help is appreciated.
Ford Sierra history

General / Get coordinates on a rotated object?
« on: September 03, 2008, 09:00:28 am »
I have an rectangle which can be rotated. I need to know how to get the top-right coordinates of the rectangle after rotation. This seems to be a very simple problem really but I suck at math  :oops:

Ford Customline specifications

General / SVN-Problems
« on: May 24, 2008, 07:48:54 am »
I tried for the first time to download the latest SVN and as you can guess I've  run into some problems.

I've copied and replaced the include/SFML folder but when I try to run this code it won't work.

Code: [Select]

#include <SFML/Graphics.hpp>

int main(int argc, char *argv[])
    sf::RenderWindow    RenderWindow(sf::VideoMode(800,600,32),"Test");
    sf::Event           Event;  
    bool                Loop = true;
            if(Event.Type == sf::Event::Closed)
                Loop = false;                        

When I try to run this code it says:   [Linker error] undefined reference to `sf::RenderWindow::RenderWindow(sf::VideoMode, std::string const&, unsigned long, sf::WindowSettings const&)'

Obviously I'm missing something here but I'm a complete noob at this and  need some help.
vapir air one

Graphics / How to use sfRect Intersect()?
« on: September 06, 2007, 11:29:11 pm »
Okey, I'm making a simple Arkanoid-game and having trouble using this sfRect public member function.

Code: [Select]

bool Intersects(const sfRect<T>& Rect, sfRect<T>* OverlappingRect = NULL) const;

I'm trying to use this function to tell when the paddle and the ball has collided however this doesn't seem to work. This is currently how I'm doing it:

Code: [Select]

void HandleBallToPlayerCollision()
      if( paddle->GetRect().Intersects(ball->GetRect()))
             // Do stuff here.....          

This method doesn't work. The function returns true even if there is no collision.
How should I do to make this work?

Graphics / Problem with image loading!
« on: September 04, 2007, 04:59:49 pm »

I have 2 pics that i want to use on a sprite. One of the pics is 100x100 and the other is 50x50 pixels.

Code: [Select]

sfImage image1;
sfImage image2;
sfSprite sprite(image1);


When i'm trying to set a new image the the size doesn't change. So when i use sprite.SetImage(image2) the size is still the same size of image1. How do i do to set the size so it's the same as image2?

Pages: [1]