[Scummvm-devel] Re: 16 bit graphics: Thoughts on how to implement it

David Given dg at cowlark.com
Wed Jul 24 09:04:03 CEST 2002


On Wed, 2002-07-24 at 16:46, J.Brown (Ender/Amigo) wrote:
[...]
>  - Platform portabiity: Oh come on, using native widget sets is insane. We
> rely on being able to run on almost every platform using SDL. Sure, some
> small things are platform specific, like midi - and some platforms DO have
> a native backend - but most of those platforms with a native backend don't
> PROVIDE widget sets!

Not quite what I was thinking. I'm not suggesting providing a generic
widget set that ScummVM uses, which is then mapped onto host widgets,
but instead shifting the entire GUI into the platform code.

ScummVM basically looks like this.

for (;;)
{
	get event from UI code
	handle event
}

If you were to define some events for doing things like loading and
saving games, changing games, etc, and then *made it the platform's
responsibility to generate those events*, then you abstract away all the
GUI out of the ScummVM core entirely. This would allow the platform code
to implement the GUI in the native, appropriate way for that platform.
For example, MacOS would define the whole GUI inside a resource file,
Unix/gtk would use a Glade file, etc.

This would split up the functional units of the ScummVM rather more,
making the code simpler and more readable. It *would* require the user
interface to be reimplemented for each platform, though (but on most
platforms this wouldn't be hard).

>  - We need to overlay and interact widgets on a fixed video memory buffer.
> I know of very few operating systems that provide this functionaity in a
> stable and easily exposed way.

Not necessarily. Just have the platform code return a drawable surface,
and then have ScummVM draw onto that surface. This is the only really
portable way of doing things, anyway; ScummVM should not care how the
surface is implemented.

> Anyway, I do not see any way this can be done. And to be frank, I don't
> WANT it to be done. Besides the above technicalities, I want a consistant
> user interface for those of us who frequently move between platforms.

Um... consistency is good, yes, but surely that's consistency with other
applications *of that platform*? You want a Windows app to look and
behave like a Windows app, and a Gtk app to look like a Gtk app, etc...
(see bazillion other flames on the Mozilla lists for more info).

(If necessary, an SDL-specific platform could be created that drew its
GUI directly onto the SDL surface. This would give you a common GUI for
all SDL platforms, if the user so desired.)

-- 
+- David Given --McQ-+ "Why should we put ourselves out of our way to
|  dg at cowlark.com    | serve posterity? For what has posterity ever done
| (dg at tao-group.com) | for us?" --- Sir Boyle Roche
+- www.cowlark.com --+ 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 232 bytes
Desc: This is a digitally signed message part
URL: <http://lists.scummvm.org/pipermail/scummvm-devel/attachments/20020724/5d873310/attachment.sig>


More information about the Scummvm-devel mailing list