Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: [Thor] Animator class constructor  (Read 2041 times)

0 Members and 1 Guest are viewing this topic.

Yee7i

  • Newbie
  • *
  • Posts: 13
    • View Profile
[Thor] Animator class constructor
« 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

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.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: [Thor] Animator class constructor
« Reply #1 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.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Yee7i

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: [Thor] Animator class constructor
« Reply #2 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, 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?
« Last Edit: September 17, 2019, 08:29:37 pm by Yee7i »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: [Thor] Animator class constructor
« Reply #3 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?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Yee7i

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: [Thor] Animator class constructor
« Reply #4 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

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