Move special debug flags init to plugin API
|Reported by:||fingolfin||Owned by:|
Right now, the special debug flags (see common/util.cpp) are setup in the Engine constructors.
It would be nice if we changed this by providing a plugin API function whcih returns a list of all special debug flags supported by the engine. This way it would be possible to implement a "--list-debug-flags" CLI command; it would also be possible to preparse/validate the debug flag list. It would be possible to use the debug channels/flags from inside, say, the detection code (before the engine instance has been constructed). Furthermore, other parts of ScummVM (say, backends or MIDI drivers) could take advantage of the debug flags.
It shouldn't be hard to implement the basics of this (adding "--list-debug-flags" could be left for later).
Ticket imported from: #1651696. Ticket imported from: feature-requests/351.