gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Coding > Overlapping windows?

#112375 - Dwedit - Fri Dec 15, 2006 8:52 pm

When two windows overlap, does it OR the layers specified in WININ together or what? What exactly happens when two windows overlap? Gbatek isn't clear enough on this, it doesn't match the behavior under VBA and NO$.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."

#112377 - tepples - Fri Dec 15, 2006 8:57 pm

In GBATEK, Martin Korth wrote:
In case that more than one window is enabled, and that these windows do overlap, Window 0 is having highest priority, Window 1 medium, and Obj Window lowest priority.

Translation: Window 0 is in front of window 1, which is in front of object window, which is in front of window outside. For pixels that fall inside both window 0 and window 1, the GBA uses the window 0 settings.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#112378 - Dwedit - Fri Dec 15, 2006 9:06 pm

Yeah, but I'm not getting that effect in VBA, I'm getting an OR effect instead. Since it seems wrong that actual behavior would contradict gbatek, I'll double check my code again...
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."

#112380 - tepples - Fri Dec 15, 2006 9:16 pm

What behavior are you getting on the hardware? If the behavior on the hardware differs from the behavior on VBA, then you can make a test case, and kxu has some work to do.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#112381 - gmiller - Fri Dec 15, 2006 9:20 pm

By all means check the hardware if you can. The behavior of VBA when different from the real thing is a bug. I have found a number of there when dealing with interrupts and blending.

#112401 - Dwedit - Fri Dec 15, 2006 11:22 pm

The verdict: My code is messed up, go ahead and ignore this thread.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."