Screen being overwritten (push/pop issue?)

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
stout
Citizen
Posts: 64
Joined: Sun Oct 07, 2012 4:42 pm

Screen being overwritten (push/pop issue?)

Post by stout »

Do a new game, hit enter, screen goes black. Press P and it clears back up. Relevant code is in worldgen.lua at the bottom of the file.

The following is weirdness:

1) The code for the palette box is the same as for the menu box. The menu works fine if you comment out the palette code.
2) The menu used to have this problem too! At some point, it just.. resolved.. or seemed to. Now I suspect I still have a problem.
3) The screen is being overwritten with black. If you change all the color values to non-black colors.. it STILL overwrites with black! So I can't even track down where the issue is.

No idea what's going on. If I do all my setColors manually, this doesn't happen, so I'm using push() and pop() wrong, I guess? What's the deal?
Attachments
worldgen.love
(120.46 KiB) Downloaded 89 times
User avatar
Kadoba
Party member
Posts: 399
Joined: Mon Jan 10, 2011 8:25 am
Location: Oklahoma

Re: Screen being overwritten (push/pop issue?)

Post by Kadoba »

I believe push and pop only affects love.graphics.translate() and love.graphics.scale(). The active color you will have to keep up with manually.
stout
Citizen
Posts: 64
Joined: Sun Oct 07, 2012 4:42 pm

Re: Screen being overwritten (push/pop issue?)

Post by stout »

Oh! Well.. that explains that! I thought it handled any love.graphics changes.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 21 guests