Search found 7 matches
- Fri Jan 11, 2013 9:10 pm
- Forum: Support and Development
- Topic: getColor/setColor subtracting 1
- Replies: 10
- Views: 6172
Re: getColor/setColor subtracting 1
does this little workaround work for any color you get and set, or is it limited to 255, 255, 255, 255 ? And if I put it in my source (where get color acts as it should) is it going to screw anything up for me (that does not have the problem) because If I can use it for any color, then I might put ...
- Wed Jan 09, 2013 6:22 pm
- Forum: Support and Development
- Topic: getColor/setColor subtracting 1
- Replies: 10
- Views: 6172
Re: getColor/setColor subtracting 1
it subtracts 2 each time That rules out rounding errors, then. Also, calling getColor and setColor multiple times per frame doesn't make the rgba-values decrease any faster, which seems to suggest that the problem isn't in those functions themselves. Although I haven't found the cause of the proble...
- Tue Jan 08, 2013 6:27 am
- Forum: Support and Development
- Topic: rotate an image in the direction of the mouse
- Replies: 11
- Views: 9367
Re: rotate an image in the direction of the mouse
A little trigonometry should do the trick. You have a triangle like this, where B is the barrel and M is the position of your mouse cursor. http://ronkes.nl/images/trigonometry.png You know the coordinates of both B and M, so you can calculate two of the sides of the triangle: M.x - B.x and M.y - B....
- Mon Jan 07, 2013 10:16 pm
- Forum: Support and Development
- Topic: getColor/setColor subtracting 1
- Replies: 10
- Views: 6172
Re: getColor/setColor subtracting 1
Okay, so I just dug up my old laptop and tested it there: no problems. It seems to be something specific to my current machine. Strange. Anyway, thanks Jasoco and Saegor for testing. If anyone of you ever gets a bug report from one of your players that stuff seems to fade out for no reason, they may...
- Mon Jan 07, 2013 10:02 pm
- Forum: Support and Development
- Topic: Collision Explanation
- Replies: 1
- Views: 1634
Re: Collision Explanation
I renamed the variables in the CheckCollision function. Hopefully, this makes things a bit clearer. function CheckCollision(aLeft, aTop, aWidth, aHeight, bLeft, bTop, bWidth, bHeight) local aRight = aLeft + aWidth local aBottom = aTop + aHeight local bRight = bLeft + bWidth local bBottom = bTop + bH...
- Mon Jan 07, 2013 9:37 pm
- Forum: Support and Development
- Topic: getColor/setColor subtracting 1
- Replies: 10
- Views: 6172
Re: getColor/setColor subtracting 1
That would mean that it works differently on different computers. That's unfortunate, but thanks for testing. I was a bit surprised, actually, that no-one else had reported the same problem (not that I could find, anyway). I'd expect using getColor and setColor to be a common way to save and restore...
- Mon Jan 07, 2013 9:16 pm
- Forum: Support and Development
- Topic: getColor/setColor subtracting 1
- Replies: 10
- Views: 6172
getColor/setColor subtracting 1
love.graphics.getColor (or love.graphics.setColor, I'm not sure) is giving me some unexpected behaviour. I have the following code. function love.draw() local r, g, b, a = love.graphics.getColor() love.graphics.print(r .. ', ' .. g .. ', ' .. b .. ', ' .. a, 0, 0) love.graphics.setColor(r, g, b, a) ...