[Scummvm-devel] New GUI options were added to ScummVM. ATTN all engine devs.

Eugene Sandulenko sev at scummvm.org
Sat Jun 6 21:02:26 CEST 2009


Hi Team,

I recently added new feature to ScummVM GUI which I called Game GUI
options. This was an old planned thing from me and I finally got my
hands over the implementation.

In short, it is a 'guioptions=' key which is added on game detection,
and it is a list of "no's" which is used to disable certain GUI widgets
which are not used by some particular game.

Since it is number of 'NO's' and not 'DO's', it does not break all
existing scummvm.ini files, which will make our users happy. As a
consequence, in order to benefit from GUI options, a user should
redetect all his game collection. Mass add could help with it (which
was also improved, btw ;) ).

The currently implemented flags are (common/util.h & .cpp):

  GUIO_NOSUBTITLES  -- disables all subtitle controls
  GUIO_NOMUSIC  -- disables music volume controls
  GUIO_NOSPEECH -- disables speech volume controls
  GUIO_NOSFX  -- disables SFX volume controls
  GUIO_NOMIDI  -- disables whole MIDI tab
  GUIO_NOLAUNCHLOAD -- disable Load button

These flags are just a start, and it may happen that it will make sense
to disable more widgets with them or add more/less granularity. My aim
was to make this solution flexible. So all of you are encouraged to add
new flags and improve existing ones.

Now there is some work for the engine authors:

I modified all engines in order to make them generate guioptions key
on detection, but I am sure I was wrong in many cases with particular
game GUI options for each detection entry. You guys really know which
games have speech and which don't, which have music and SFX and which
do not have subtitles, etc.

So please, review your detection tables and fix wrong entries.

Some thoughts about potential flags and some rants on the
implementation.

I think that NOMT32 and NOADLIB could make sense since there are
number of controls which could look weird to the end user who do not
use, esp. Roland MT-32 device.

NOLAUNCHLOAD flag seems to be redundant, since there is
"kSupportsLoadingDuringStartup MetaEngine flag, but that's only at a
first glance:

  o MetaEngine flag could be queried only at game launch, whereas GUI
    option disables the button right away.
  o MetaEngine flag shows what the engine has implemented. For example,
    currently CruisE engine does not have load from launcher
    implemented, but this could change in the future.
  o GUI option, on the contrary, shows what the _game_ can not do. And
    current understanding is that AGOS and Gob games cannot have load
    from launcher implemented since their load is fully scripted.

Also currently there is no way to update already set GUI options, other
that redetecting the game over again. This is a flaw in our current
design, but I think it is quite possible with a bit of work to have a
method like "redetectGame(id)" in engine implemented. This will let us
to do more flexible things with our configuration file when engines
evolve.

Also since there is no way to update the flags, the list is turned into
list of 'NO's,' whereas more natural would be to have it as list of
'DO's' as the games tend to use narrow subset of options.

Additionally, if a developer mistakenly puts some NO in GUI option,
there is no current way to remove it, only by forcing the user to
redetect the game. In my opinion this is really nasty and
annoying drawback of our current architecture.

That's all for now, your comments are welcome and appreciated.


Eugene




More information about the Scummvm-devel mailing list