airstruck / luigi

Lovely User Interfaces for Game Inventors
MIT License
113 stars 23 forks source link

fixes for löve 11.0 #60

Closed poke1024 closed 6 years ago

airstruck commented 6 years ago

Did Love really jump from major version 0 to major version 11? Haven't looked at it in a while...

fendrin commented 6 years ago

Yes, the Löve version jumped from 0.10.2 to 11.0 with the latest release. Although the release happened on April the First the change persists.

But I am skeptical about translating color values from range 0-255 into 0-1. This solution either forces the user to use the old range in all of her project or to handle 2 different color formats.

poke1024 commented 6 years ago

@airstruck Yes, they changed the version to 11.0, see VERSION_MAJOR here:

https://bitbucket.org/rude/love/src/a95b5df234f888dcf751f3fb3a39783a7bb67b5f/src/common/version.h?at=default&fileviewer=file-view-default

The color range change is documented here as Changed all color values to be in the range 0-1, rather than 0-255.:

https://love2d.org/wiki/11.0

tst2005 commented 6 years ago

Hello guys,

I'm thinking about how to make a wrapper for compat.

It remember me the worst API change ever made on Love : love.timer.sleep before/after 0.8.0

fendrin commented 6 years ago

I don't think luigi should translate color values, with maybe the exception of those found in the example files.

airstruck commented 6 years ago

@fendrin I'm torn on this one... SDL uses 0-255, so if Luigi moves to 0-1, it'll shift the problems you describe over to the SDL side. Luigi also works with older Love versions, so it'll also shift the problems back onto those versions if anyone's using them.

@tst2005 if only Lua were strongly typed ;)

I'm just gonna merge this for now, thanks @poke1024. Might be open to a 0-1 patch later, as long as it covers the SDL side. Or possibly something clever like choosing behavior based on Love version or user preference?