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

Author Topic: Problem with convertCoords in RenderTarget  (Read 2443 times)

0 Members and 1 Guest are viewing this topic.

Goras

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
Problem with convertCoords in RenderTarget
« on: January 18, 2013, 10:51:48 am »
Hello,

Maybe it has been already asked but the search module doesn't work actually.
I'm developping a game in SFML 2.0 with VC++ 11 (VS 2012) and i recently added a sf::View in my game to zoom or move the map. So i need to convert coords and try to use the function like this :
m_vMousePos = NS_GLOBAL::Window.convertCoords(NS_GLOBAL::GetMousePos());

NS_GLOBAL is just a global namespace and the Window declared like this:
extern sf::RenderWindow Window;
The GetMousePos() is this function :
return sf::Mouse::getPosition(Window);

This code works with the SFML 2.0 RC but when i get the last snapshot i'm getting this error :
Quote
Erreur   3   error LNK2019: symbole externe non rÚsolu "__declspec(dllimport) public: class sf::Vector2<float> __thiscall sf::RenderTarget::convertCoords(class sf::Vector2<int> const &)const " (__imp_?convertCoords@RenderTarget@sf@@QBE?AV?$Vector2@M@2@ABV?$Vector2@H@2@@Z) rÚfÚrencÚ dans la fonction "public: void __thiscall CGameManager::Update(float)" (?Update@CGameManager@@QAEXM@Z)   D:\SVN\2012-2013\Sections\Prog3\Eric Dovergne\Projets\DK-X\DK-X\GameManager.obj

In the last snapshot the function "convertCoords" seems to be missing in RenderTarget.
Maybe this function has been deleted during the snapshot, i don't know, so i need some help.

Thanks a lot for de answers !

G.

  • Hero Member
  • *****
  • Posts: 1592
    • View Profile
Re: Problem with convertCoords in RenderTarget
« Reply #1 on: January 18, 2013, 11:09:20 am »
The name changed to mapPixelToCoords. (see https://github.com/SFML/SFML/commit/6ce6014dd8517ee3012c0b969484f6bc258e65ef )

The documentation on the website matches the 2.0RC. You need to generate it yourself if you want the latest doc matching the latest sources.
« Last Edit: January 18, 2013, 11:11:49 am by G. »

Goras

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
Re: Problem with convertCoords in RenderTarget
« Reply #2 on: January 18, 2013, 11:30:21 am »
Oh my god, so quick !! Thanks a lot and sorry for the post because there is information in the doc.

Thanks again ! I will share my project in the future version, a sort of Dungeon Keeper 2D (prototype before the 3D Project ;))

G.

  • Hero Member
  • *****
  • Posts: 1592
    • View Profile
Re: Problem with convertCoords in RenderTarget
« Reply #3 on: January 18, 2013, 11:36:03 am »
NP, and good luck, Dungeon Keeper is awesome.  :D