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

Author Topic: Sprite::GetCenter  (Read 4738 times)

0 Members and 1 Guest are viewing this topic.

drobole

  • Newbie
  • *
  • Posts: 9
    • View Profile
Sprite::GetCenter
« on: December 28, 2009, 05:33:20 pm »
Hello

I seem to have a strange problem with Sprite::GetCenter using the latest trunc from SVN. Basically, it always returns coordinates 0.0, 0.0

Is this a known issue?

My system is Windows 7 x64, VC++ 2008 express

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Sprite::GetCenter
« Reply #1 on: December 28, 2009, 05:41:03 pm »
It's not the center like (width / 2, height / 2), it's the center of translation/rotation/scaling that you set with SetCenter. So yes, it's always (0, 0) until you change it :)
Laurent Gomila - SFML developer

drobole

  • Newbie
  • *
  • Posts: 9
    • View Profile
Sprite::GetCenter
« Reply #2 on: December 28, 2009, 07:00:46 pm »
Quote from: "Laurent"
It's not the center like (width / 2, height / 2), it's the center of translation/rotation/scaling that you set with SetCenter. So yes, it's always (0, 0) until you change it :)


Ahh, I get it.
Thanks for the quick reply

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Sprite::GetCenter
« Reply #3 on: December 28, 2009, 09:41:02 pm »
In SFML 2, the method is called GetOrigin(), this name is less confusing.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

drobole

  • Newbie
  • *
  • Posts: 9
    • View Profile
Sprite::GetCenter
« Reply #4 on: December 28, 2009, 10:41:51 pm »
Quote from: "Nexus"
In SFML 2, the method is called GetOrigin(), this name is less confusing.


Agree.
So I assume SFML2 won't be backward compatible with SFML?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Sprite::GetCenter
« Reply #5 on: December 28, 2009, 11:33:10 pm »
Quote
So I assume SFML2 won't be backward compatible with SFML?

Absolutely, a lot of things have completely changed. That's why it is SFML 2.0 and not SFML 1.6 ;)
Laurent Gomila - SFML developer

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Sprite::GetCenter
« Reply #6 on: December 29, 2009, 02:50:16 pm »
Another reason to switch now to SFML 2 and not after the current project is finished in SFML 1.5. ;)

No, I am very glad that backward compatibility doesn't get first priority. Better make a clean, uniform interface and force some users to change code than keeping old relicts and begin to mark library parts as deprecated. SFML is so well-designed, it would be a pity to limit its progress.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development: