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

Pages: [1]
1
Graphics / Spritesheet with Rect
« on: April 03, 2010, 02:45:20 pm »
It's asking me coordinates of Left, Top, Right and Bottom, but I am already giving them.
Code: [Select]
sf::IntRect Rect[ 2 ];
Rect[0].Left(0, 0);
Rect[0].Top(16, 0);
Rect[0].Right(16, 16);
Rect[0].Bottom(0, 16);

Quote
term does not evaluate to a function taking 2 arguments

So i guess it needs other values, but what? And, btw, in what order are the points? I mean is Left meant to be top-left, or bottom-left?

2
Graphics / Spritesheet with Rect
« on: April 03, 2010, 12:15:18 am »
I know, that there are libraries on the wiki, but i just wanted to go trough the process myself, of using spritesheets.
The spritesheet is 32x16 and i created an Rect, that holds the positions of the sprites in the sprite sheet.
I know that giving an rectangle as coordinates doesn't work, but how do i get around this?
Code: [Select]
sf::Image Image;
    if (!Image.LoadFromFile("spritesheet.png"))
        return EXIT_FAILURE;

sf::Shape Rect[ 2 ];
Rect[0].SetPointPosition(1, 0, 0);
Rect[0].SetPointPosition(2, 16, 0);
Rect[0].SetPointPosition(3, 16, 16);
Rect[0].SetPointPosition(4, 0, 16);

Rect[1].SetPointPosition(1, 16, 0);
Rect[1].SetPointPosition(2, 32, 0);
Rect[1].SetPointPosition(3, 32, 16);
Rect[1].SetPointPosition(4, 16, 16);

    sf::Sprite Sprite(Image);
Sprite.SetSubRect(Rect[0]);

3
Window / Simple Noob error with the Windows Tutorial
« on: March 06, 2010, 07:54:57 pm »
Yes, that fixed it, and i also got the order wrong, everything is working great now! 8)

4
Window / Simple Noob error with the Windows Tutorial
« on: March 06, 2010, 04:55:56 pm »
Still having problems with setting up :/
Everything went fine, till text tutorial. VC++ started giving me these errors, when exiting the app:

Wasn't able to find a way to get rid of it, so now I'm asking again for help.

EDIT: i had CodeBlocks, so i tried to set up on them aswell, and it has the same problem. What am i doing wrong?

5
Window / Simple Noob error with the Windows Tutorial
« on: March 05, 2010, 01:32:21 pm »
Sorry, then it must be my lack of english knowledge.
Thanks for all the help, this library really is simple to learn, getting hang of it right now!

6
Window / Simple Noob error with the Windows Tutorial
« on: March 05, 2010, 12:32:36 pm »
Ah, yes, how did i miss that? Thank you!
Then i had the same problem, that OP did - unresolved externals. But linking to sfml-window-d.lib as well, fixed it. The question is - why do i have to use both window and graphics libraries? In the tutorial it is said, that graphics library has the functions needed.

7
Window / Simple Noob error with the Windows Tutorial
« on: March 03, 2010, 11:44:25 pm »
I have the same problem, but i have done everything to prevent it. My vc++ just doesn't seem to be able to find sfml.system-d.lib and sfml.graphics-d.lib :(
Code: [Select]
LINK : fatal error LNK1104: cannot open file 'sfml.system-d.lib'
Checked it multiple times. Maybe it has something to do with compilers settings? Altough everything seems to be set and linked right.
EDIT: i was using the graphics tut, but the idea is the same.

Pages: [1]
anything