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

Pages: 1 [2]
16
Graphics / Problem with image loading!
« on: September 04, 2007, 06:01:52 pm »
Quote from: "Mindiell"
I don't think this is the good solution. What you do is having a 100x100 image and taking only the first 50x50 part...

My first question is :
- Why are you using the same sprite to draw 2 images ?


Well, I'm making a simple pong game and i want the paddles to be able to change size.
Perhaps it's better to use diffrent sprites for the different sizes instead of different images?

(I have always used this way when i'm doing applications in SDL and it's working fine)
________
Shemale Sex

17
Graphics / Problem with image loading!
« on: September 04, 2007, 05:33:54 pm »
Yes, that did the job! Thanks a lot!
________
Ffm Babysitter

18
Graphics / Problem with image loading!
« on: September 04, 2007, 05:24:02 pm »
No, that didn't work. When I'm drawing the sprite the image2 pic is displayed
4 times. When i tried scaling it there was no difference except it's all getting smaller.

Thanks for the quick reply, though.
________
ROOR BONGS

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

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;
   
image1.LoadFromFile("image1.bmp");
image2.LoadFromFile("image1.bmp");
   
sfSprite sprite(image1);

sprite.SetImage(image2);


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?
________
Lolol

Pages: 1 [2]