[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Fill doesn't seem to work as expected.



Thanks Brian, it's good to know why it was doing that, and even better to already have it fixed.

Charlie, the blend fill option is new in 1.8.0. As you said, normally I wouldn't expect the fill to be anything but a dumb *splort* all over what was already there, but the new Surface.fill docs said it should work. I can definitely see some uses for this for effects (dimming an existing area is just the simplest) - but for now I'll just add a conditional test to see if the pygame version is less than 1.8.2 and fall back to the workaround.

Ron

P.S. After beating Cave Story on hard mode I've been inspired to finally make another game again. I wrote a 2d layered tile engine (based on Pygame of course) for large maps that works on tiled (http://www.mapeditor.org/) maps - the performance is surprisingly good. Now I'm putting a game on it to work out any API issues. As usual that's much harder than writing the engine.


Brian Fisher wrote:
The bug was in the CREATE_PIXEL macro. it was using the Aloss incorrectly, so it was taking the alpha value (255, even though it meant nothing in your case) and putting it in a random place in the color (in your instance, it was putting it in the green slot), adding unintended color into the pixel after doing the desired blend op.