SFML community forums

Help => General => Topic started by: hythron on June 28, 2010, 01:47:54 pm

Title: Crash after clear
Post by: hythron on June 28, 2010, 01:47:54 pm
After reinstalling visual studio 2008 I suddenly get all kind of erros within my project that worked fine before.

first the know crash bug with sf::String. I heard it was fixed in 1.6 but for me it is still there.

when I comment out the sf::String I get another crash after the App.Clear() function. Yes I have used the debug Libraries like sfml-window-b.lib

whyyyyyy  :cry:
Title: Crash after clear
Post by: Laurent on June 28, 2010, 01:57:20 pm
You're probably still using the SFML 1.5 DLLs, are you sure that you completely removed them?
Title: 1.6 draw issues
Post by: hythron on June 28, 2010, 02:37:54 pm
thx, that was the problem! project is running again.
but now I am using 1.6 I get draw image issues. I have a scroll map with tiles. every tile have now a transparent border or do not fit well.  is there something changed within the draw/view engine because its not my code because it was fine in 1.5
Title: Crash after clear
Post by: Laurent on June 28, 2010, 02:42:34 pm
Can you post a screenshot?
Title: Crash after clear
Post by: hythron on June 28, 2010, 02:52:54 pm
(http://student-kmt.hku.nl/~jelle3/why.PNG)

its weird because it is just simple code like x=imageWidth*i
Title: Crash after clear
Post by: Laurent on June 28, 2010, 03:03:14 pm
Does it work if you turn image smoothing off?
Title: Crash after clear
Post by: hythron on June 28, 2010, 06:38:26 pm
You are amazing. Only a couple of tiles are wrong but that's probably within my code.
Thank you so much for the quick replies.

(http://student-kmt.hku.nl/~jelle3/why2.PNG)
Title: Crash after clear
Post by: hythron on June 28, 2010, 08:20:17 pm
The reason because some tiles still did't fit is because I am rotating and set another center to the sprites.
Do you have any clue why this is?

Code: [Select]

sprite.SetCenter(bgTileSize,bgTileSize);
sprite.SetRotation(180);
sprite.SetImage(ImageControl::Instance()->GetImage(BG_TILE_WATER_END));
Title: Crash after clear
Post by: Laurent on June 28, 2010, 09:08:44 pm
Did you try the center without the rotation, and vice-versa? Is bgTileSize a decimal value?
Title: Crash after clear
Post by: hythron on June 28, 2010, 10:00:42 pm
It's a decimal float value set to 320, it only occurs when I use sf::Sprite::SetRotation() func.
SetCenter works fine.
Title: Crash after clear
Post by: hythron on June 30, 2010, 08:59:09 pm
Is there a solution or alternative to rotate a sprite and stay fitting?
else I will do the rotation within the image.
Title: Crash after clear
Post by: Laurent on June 30, 2010, 11:13:23 pm
There's no other solution, but rotating 180° should not produce such artifacts.

Can you try with SFML 2? Maybe with a simple code, if your game is too big.