Page 2 of 4
Re: API Wars
Posted: Wed Jan 14, 2009 10:56 pm
by osgeld
you could define a constant
in lsl (secondlife scripting) one constant is DEG_TO_RAD (and RAD_TO_DEG)
so when you want to convert its deg * DEG_TO_RAD
course all that constant is really doing is deg * (PI / 180) but its kind of a middle ground tween expecting everyone to know how to convert and a full blown function, and i would assume much easier to implement
-2 cents
Re: API Wars
Posted: Wed Jan 14, 2009 11:30 pm
by Kaze
Or just use math.rad and math.deg.
Re: API Wars
Posted: Thu Jan 15, 2009 12:06 am
by osgeld
holy crap, almost 2 years messing around with lua and i have never noticed those before!
ok i will stop talking now
Re: API Wars
Posted: Thu Jan 22, 2009 4:22 pm
by rude
Ok, next war:
Default local origin in top-left of the image.
VS
Default local origin at the center of the image.
I.e.: given love.graphics.draw(image, 50, 50), should the image be drawn so that the center is at (50, 50) or so that the top-left corner of the image is at (50,50)?
Thaaaanks!
EDIT: Clarified question.
Re: API Wars
Posted: Thu Jan 22, 2009 4:41 pm
by petsagouris
This is my proposal for this problem. Pretty Lua.
Code: Select all
love.graphics.draw(image, %d+, %d+, [placement_origin,] [placement_offset])
Draws the default current behavior if placement_origin variable is not provided.
possible
placement_origin values:
Code: Select all
love.TL, love.TM, love.TR
love.ML, love.MM, love.MR
love.BL, love.BM, love.BR
possible
placement_offset values:
any specific set of x and y distance from the origin point.
Re: API Wars
Posted: Thu Jan 22, 2009 4:52 pm
by rude
Yes, but what should the default behavior be?
Re: API Wars
Posted: Thu Jan 22, 2009 5:42 pm
by petsagouris
As the OpenGL/GLUT combo functions. Top Left. (for historical reasons as they say)
Did I mention that I totaly respect what you are doing here. Well done!
Re: API Wars
Posted: Thu Jan 22, 2009 5:56 pm
by bartbes
It really doesn't matter to me (althought top-left does seem more correct), however if you change the default behaviour there has to be some sort of compat-code (maybe something with the version string in the config?) as it will invalidate all previous-written games.
Re: API Wars
Posted: Thu Jan 22, 2009 6:01 pm
by osgeld
i vote top left
Re: API Wars
Posted: Thu Jan 22, 2009 6:13 pm
by rude
Ok, looks like top-left so far.
bartbes wrote:it will invalidate all previous-written games
Oh, hohohohoh. All games will be invalidated anyway. The next codename should be
Chicxulub, because when I'm done with this version, all that's left of the API is an impact crater. The users that never use LÖVE again due to massive API break will be called Dinosaurs. (They eventually go extinct).
HAHAHAhahahha ... hah. ha.
petsagouris wrote:Did I mention that I totaly respect what you are doing here. Well done!
That's cool.