SFML community forums

Help => General => Topic started by: Yee7i on September 17, 2019, 02:28:45 pm

Title: [Thor] Animator class constructor
Post by: Yee7i on September 17, 2019, 02:28:45 pm
I'm using newly-built Thor 2.0 in VS2019 Community.

Yesterday I've encountered a problem, which I sadly cannot resolve myself

I was trying to animate an sf::Sprite, using thor::Animator class, referring to a guide on Bromeon's website under http://www.bromeon.ch/libraries/thor/tutorials/v2.0/animations.html (http://www.bromeon.ch/libraries/thor/tutorials/v2.0/animations.html)

The problem is, even when copying that code into my VS, it automatically underlines the code red and says I'm missing default constructor (as in attachment 1).

In attachment 2 the code is literally copied.
I'm including <Thor/Animations/Animator.hpp> and overall <Thor/Animations.hpp> and have Thor linked both under release and debug versions, with and without -d respectively.
Title: Re: [Thor] Animator class constructor
Post by: eXpl0it3r on September 17, 2019, 03:59:17 pm
Thor 2.0 which the tutorials are based on is different from the code that is on the master branch.
There have been quite a few changes w.r.t. the animation bits.
Title: Re: [Thor] Animator class constructor
Post by: Yee7i on September 17, 2019, 04:58:01 pm
As I said, I'm using Thor 2.0, the one from http://www.bromeon.ch/libraries/thor/download/index.html (http://www.bromeon.ch/libraries/thor/download/index.html), under latest release.

Edit. well, as soon as Bromeon replied to my email it turns out Thor is now in 2.1, along with new documentation, so that's my bad. Now the question is, is the "latest release", which is said to be 2.0, actually 2.1?
Title: Re: [Thor] Animator class constructor
Post by: eXpl0it3r on September 18, 2019, 12:08:21 am
The latest points to the Thor 2.0 SDK.

Not sure why it wouldn't work as mentioned in the tutorial.
Maybe it's just IntelliSense being less than intelligent or does building the also fail?
Title: Re: [Thor] Animator class constructor
Post by: Yee7i on September 18, 2019, 12:16:00 am
Well, I got that working after a few attempts, but now I'm facing another issue I described here https://stackoverflow.com/questions/57980768/thoranimator-playing-only-one-frame (https://stackoverflow.com/questions/57980768/thoranimator-playing-only-one-frame)

Basically Animator plays only one frame, but if you can take a look there, since I'm sure you have way more experience than me, I'd be really grateful

Thanks for developing SFML by the way, I could learn much stuff because of it