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

Author Topic: Getting absolute coordinates  (Read 9791 times)

0 Members and 1 Guest are viewing this topic.

Williamson

  • Newbie
  • *
  • Posts: 16
    • View Profile
Getting absolute coordinates
« Reply #15 on: December 06, 2008, 10:23:23 pm »
Thanks, hadnt seen that.
But I am using linux(gcc), and when I do make install, it tells me the libs are missing.
I tried using the old ones, but no cigar.
Should the .so s be on the SVN?
Thanks for the help so far!
Williamson

bullno1

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Getting absolute coordinates
« Reply #16 on: December 07, 2008, 05:07:29 am »
I think you should "make" first to build the binary, then "make install"

Williamson

  • Newbie
  • *
  • Posts: 16
    • View Profile
Getting absolute coordinates
« Reply #17 on: December 07, 2008, 10:54:32 am »
Thanks, but I guess thi s just isnt my week!  :(

In file included from SoundFile.cpp:29:
../../SFML/Audio/SoundFileDefault.hpp:32:21: error: sndfile.h: No such file or directory
In file included from SoundFile.cpp:29:
../../SFML/Audio/SoundFileDefault.hpp:128: error: ‘sf_count_t’ does not name a type
../../SFML/Audio/SoundFileDefault.hpp:129: error: ‘sf_count_t’ does not name a type
../../SFML/Audio/SoundFileDefault.hpp:130: error: ‘sf_count_t’ does not name a type
../../SFML/Audio/SoundFileDefault.hpp:131: error: ‘sf_count_t’ does not name a type
../../SFML/Audio/SoundFileDefault.hpp:132: error: ‘sf_count_t’ does not name a type
../../SFML/Audio/SoundFileDefault.hpp:141: error: ‘sf_count_t’ does not name a type
../../SFML/Audio/SoundFileDefault.hpp:147: error: ISO C++ forbids declaration of ‘SNDFILE’ with no type
../../SFML/Audio/SoundFileDefault.hpp:147: error: expected ‘;’ before ‘*’ token
make[2]: *** [SoundFile.o] Error 1
make[2]: Leaving directory `/home/thomas/Desktop/SFMLSVNcheckout/src/SFML/Audio'
make[1]: *** [sfml-audio] Error 2
make[1]: Leaving directory `/home/thomas/Desktop/SFMLSVNcheckout/src/SFML'
make: *** [sfml] Error 2

I'll try redownloading it, to see if that make a difference
Williamson

[EDIT: Nope, still same problem]

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Getting absolute coordinates
« Reply #18 on: December 07, 2008, 11:05:18 am »
You forget 'sudo apt-get install libsndfile-dev' (or something like that).  :wink:
SFML / OS X developer

Williamson

  • Newbie
  • *
  • Posts: 16
    • View Profile
Getting absolute coordinates
« Reply #19 on: December 07, 2008, 11:46:03 am »
Thanks everyone!
It works great now
Williamson

Williamson

  • Newbie
  • *
  • Posts: 16
    • View Profile
Getting absolute coordinates
« Reply #20 on: December 07, 2008, 11:54:21 am »
Well...
This cant be good...
I recompiled, the same code as before, and got the same result.
The convertCoordinates function doesnt appear to do anything:

Type 1:5:5
Type 2:5:5
Type 1:11:3
Type 2:11:3
Type 1:10:6
Type 2:10:6
Type 1:6:4
Type 2:6:4
Type 1:5:6
Type 2:5:6
Type 1:9:4
Type 2:9:4
Type 1:7:2
Type 2:7:2
Type 1:7:5
Type 2:7:5
Type 1:13:5
Type 2:13:5
Type 1:12:2
Type 2:12:2
Type 1:11:2
Type 2:11:2
Type 1:10:5
Type 2:10:5
Type 1:14:6
Type 2:14:6

Is this an error caused by me?
Williamson

Williamson

  • Newbie
  • *
  • Posts: 16
    • View Profile
Getting absolute coordinates
« Reply #21 on: December 07, 2008, 01:47:36 pm »
I found what was wrong!
It was a REALLY stupid mistake!
I put :

sf::Vector2f MousePosAbsolute = displayWindow.ConvertCoords(displayWindow.GetInput().GetMouseX(), displayWindow.GetInput().GetMouseY());
                           
Instead of :

sf::Vector2f MousePosAbsolute = displayWindow.ConvertCoords(displayWindow.GetInput().GetMouseX(), displayWindow.GetInput().GetMouseY(), &view);

It does exactly what I want now  :)

Thanks to all for your help and patience

Williamson

 

anything