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

Pages: [1]
1
General / Noob question about classes
« on: December 10, 2010, 05:16:16 am »
i managed to get the sf::IntRect to work but not the sf::Image


Code: [Select]
class Frame{
    public:
        Frame(const sf::Image& image, const sf::IntRect& rect);
        sf::Image& frame_image;
        sf::IntRect frame_rect;
};
Frame::Frame(const sf::Image& image, const sf::IntRect& rect)
:    frame_image(&image)
,    frame_rect(rect)
{
}


I keep getting this error:

Invalid initialization of non-const reference of type 'sf::Image&' from a temporary of type 'const sf::Image*'|



dont know how to fix that

2
General / Noob question about classes
« on: December 10, 2010, 04:09:53 am »
yeah im still confused on how to apply that onto my code. what does "r_" mean?

3
General / Noob question about classes
« on: December 09, 2010, 06:37:34 am »
Im very new to C++ myself and i have a quick class question. So i have something like this:

Code: [Select]
class Frame{
    public:
        Frame( const sf::Image& img, const sf::IntRect& rec);
        sf::Image& frame_img;
        sf::IntRect frame_rect;
};
Frame::Frame( const sf::Image& img, const sf::IntRect& rec){
    frame_img = img&;
    frame_rect = rec;
}


But i dont know how to make it so the bottom constructor sets the values for the class´s frame_img and frame_rect

4
Graphics / Painting per pixel
« on: December 08, 2010, 12:38:49 am »
Is there any ways of painting pixels individualy with a color?

5
Graphics / Making polygons
« on: December 07, 2010, 07:24:46 pm »
woops i just updated my post. How can i split a concave to convex so i can use that?

6
Graphics / Making polygons
« on: December 07, 2010, 07:18:45 pm »
I looked at the Tutorial - Graphics - Drawing simple shapes to make filled polygons but i need it to support concave shapes so i can fill use it in my dynamic light engine. If not, how can you split the concave into convex shapes?

7
General / sfml-system.dll was not found
« on: December 07, 2010, 05:13:30 pm »
okay i got it working  :D . But is there a way so i can just go New>Project>SFML Project ? Or am i going to have to place every dll i want manually into the same place with the executable  :cry:

8
General / sfml-system.dll was not found
« on: December 07, 2010, 09:53:01 am »
ehhh i still dont understand. I want it so that i can just go New->Project->SFML project and go from there

9
General / sfml-system.dll was not found
« on: December 07, 2010, 09:30:16 am »
So i followed the tutorial from the Tutorial - Getting started - SFML and Code::Blocks (MinGW) and I keep getting this "Error starting the application since the sfml-system.dll wasnt found. Reinstalling the application can solve the problem" when i try to compile it. I dont think im installing it correctly.

 :(  :(  :(  I reinstalled 4 times and keep getting the same error[/b]

I dl latest Codeblocks, full SFML SDK and then
I followed:

Copy the SFML development files to your Code::Blocks installation directory

    * Copy SFML-x.y\include\SFML to the \include directory of your Code::Blocks installation (so that you obtain include\SFML)
    * Copy the *.a files in SFML-x.y\lib to the \lib directory of your Code::Blocks installation

HELP

Pages: [1]