[Scummvm-devel] State of the SCUMM: Please read.
Max Horn
max at quendi.de
Fri Oct 18 07:11:04 CEST 2002
At 16:01 Uhr +0200 18.10.2002, Marcus Comstedt wrote:
>Max Horn <max at quendi.de> writes:
>
>> > and where the background is supposed to shine through.
>>
>> The dialog background is semi-transparent, but the background of
>> e.g. buttons is not. At least in theory :-)
>
>And how is the backend supposed to know which parts are "dialog
>background" (and thus should be semi-transparent) and which parts are
>"button background" (and should be non-transparent)? With RGB565
>format, there's no room for alpha info.
Simple. The backend doesn't know, and doesn't have to know. The game
engine does the blending.
"Overlay" is a somewhat misleading term, in reality it's more like a
second buffer at 16bit, that happens to have the same size as the
normal screen and covers it completly
>Right now, I'm treating the entire overlay as non-transparent, so it
>completely obscures the background graphics, giving everything a
>black background.
The show_overlay() and grab_clear_overlay() functions are responible
for this. In the SDL implementation, show_overlay() at the end calls
clear_overlay(). This function in turn has only one responsibility:
clearing the overlay, by setting it to the content of the game
screen, converted to 16 bit.
>
>> > Oh, and is the overlay supposed to follow the "shake_pos" or not?
>>
>> I am not sure what it is "supposed to be" myself. In the SDL backend
>> the overlay follows the shake position, i.e. it is always positioned
>> in the same spot relative to the game graphics. Since shaking is
>> frozen while the GUI shows up, neither approach makes much of a
>> difference.
>
>It affects the cursor vs graphics relative positioning, I think.
>(Both the cursor and the background are affected by shaking, so having
>the overlay not affected by shake_pos would put the cursor at an
>offset wrt the overlay if shake_pos != 0. Probably. :)
That all depends on how your backend implements shaking. IMHO there
is no need for us to standarize on this, I recommend that you just do
it as it suits you best. When it comes to the NewGUI code, all it
sees is a buffer of 320x200 (or 320x240 in Zak) into which it writes,
at certain positions. How you display that, shifted or not, is up to
you.
Cheers,
Max
--
-----------------------------------------------
Max Horn
Software Developer
email: <mailto:max at quendi.de>
phone: (+49) 6151-494890
More information about the Scummvm-devel
mailing list