scummvm/scummvm — pull request #201 by lordhoto (2012-02-29 16:42:43+00:00)
Title: Proof of Concept: Save per-game GUI options in the detection entries itself.

This is a proof of concept for per-game options being displayable in our GUI based on #181 "Per-engine and per-game GUI options (version 3)".

Most notable change is that in case of the "AdvancedDetector" based detection all the applying per-game/per-engine options are now stored on the base of detection entries, saved in their GUIO flags. This also adapts Kyra to give a feeling how this would work out in real life code.

Note again: This is purely proof of concept.

Some random notes:

- The final number of GUIO_GAMEOPTIONS flags isn't decided yet, seeing that Kyra uses 6 different options already, it should probably be more in the end.

- sev initially suggested to pass the already parsed GUI options to getExtraGuiOptions, but personally I think we shouldn't expose these implementation details to the API. If we expose the details to the API, we would also need to parse the GUIO options by hand in the code, which default setups the engine specific vars.

- There's probably need for a bit better commit message for the second commit.

- We currently can't easily rely on the code in base/main.cpp to default register all the specified engine options, since the cached GUIO flags might be outdated.