Page 1 of 1

What is the color INVERT?

PostPosted: Thu Jan 01, 2015 12:06 am
by Skyrunner65
Sorry if I'm dumb, but what is it?
The reason I'm asking is because in Rodot's Game "Crabator", the RPG explosions are INVERT.
But in the GIF, it just looks black.
Is that grey? I dunno.

Re: What is the color INVERT?

PostPosted: Thu Jan 01, 2015 1:02 am
by Myndale
It causes the pixels that are set to flip the color that's already on the screen. If your explosions are black pixels against a white background and you draw them on top of black pixels that are already on the screen then you won't see them. Using invert means you'll still see something regardless of what's "behind" them.

Re: What is the color INVERT?

PostPosted: Thu Jan 01, 2015 2:57 am
by Skyrunner65
Thanks!
One More Question: What if I want to make a Sprite of that color (Like a rectangle?)

Re: What is the color INVERT?

PostPosted: Fri Jan 02, 2015 12:38 am
by rodot
Just like with the other colors :
Code: Select all
gb.display.setColor(BLACK);
gb.display.fillRectangle(0,0,10,10);
gb.display.setColor(INVERT);
gb.display.fillRectangle(5,5,10,10);