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

Author Topic: A couple missing functions  (Read 4927 times)

0 Members and 1 Guest are viewing this topic.

fowlmouth

  • Newbie
  • *
  • Posts: 2
    • View Profile
A couple missing functions
« on: July 17, 2012, 01:02:20 pm »
Hello, I'm currently writing a CSFML wrapper for Nimrod [http://nimrod-code.org/] and I noticed a couple functions aren't exported namely sfMouse_getPosition and sfMouse_setPosition for sfRenderWindow. Before ya'll start hassling me I did see the topic about this from May but I checked and they aren't in HEAD yet. Also I'm wondering what the rationale for not exporting the variants of setPosition()-like functions which can take a vector2 or two arguments, especially when the vector2 variants call the two-argument versions.

If you're interested in the Nimrod wrapper my progress so far is at https://gist.github.com/3104298

Thanks a lot!

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: A couple missing functions
« Reply #1 on: July 17, 2012, 01:09:52 pm »
Quote
I noticed a couple functions aren't exported namely sfMouse_getPosition and sfMouse_setPosition for sfRenderWindow. Before ya'll start hassling me I did see the topic about this from May but I checked and they aren't in HEAD yet.
So this is a polite way of telling me "hurry up, I need these functions"? ;)
Seriously, I know that I have to fix this before releasing SFML 2.0. I'll try to do it soon.

Quote
Also I'm wondering what the rationale for not exporting the variants of setPosition()-like functions which can take a vector2 or two arguments, especially when the vector2 variants call the two-argument versions.
Defining multiple variants of the same function is helpful when you can keep the same name, but in C where you have to find a new name for every variant of a function, it quickly becomes confusing and bloated.
And the C binding exists only to allow other bindings to exist, I don't care about making it user friendly.
And since you're writing yourself a binding, I wonder why you ask for this.
Laurent Gomila - SFML developer

fowlmouth

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: A couple missing functions
« Reply #2 on: July 17, 2012, 02:05:31 pm »
So this is a polite way of telling me "hurry up, I need these functions"? ;)
Seriously, I know that I have to fix this before releasing SFML 2.0. I'll try to do it soon.
Hehe, no rush, but it is greatly appreciated :)

Quote
Defining multiple variants of the same function is helpful when you can keep the same name, but in C where you have to find a new name for every variant of a function, it quickly becomes confusing and bloated.
And the C binding exists only to allow other bindings to exist, I don't care about making it user friendly.
And since you're writing yourself a binding, I wonder why you ask for this.
Well, as I'm testing it I don't need to create vectors, but I don't think its wise to create a function that takes x, y, turns it into a vector, and send it the csfml function where it is destructed and not stored as a vector.