scummvm/scummvm — pull request #465 by digitall (2014-06-05 02:39:12+00:00)
Title: Add "all" option for debug flags to GUI::Debugger base class.

This implements the "all" option to debugflag_enable and debugflag_disable commands in the GUI::Debugger base class.

There are several ways this could have been implemented, but there is no obviously better implementation method, so have gone with a very simple solution i.e. The all flag does not exist internally; The DebugMan has two new methods to enable all flags/channels and disable all flags/channels. These methods are implemented by the internal API / structures. I could have chosen the converse for each of these options i.e. Add an actual internal "all" flag to be global as per the EventRec flag, pass the "all" via the existing enableDebugFlag() / disableDebugFlag() API to DebugMan and implement these only using the external API (which would reduce internal replication of code).

This should not be critical as these can be changed later if any are a problem without any impact on the Debugger interface i.e. "debugflag_enable all" and "debugflag_disable all" will still be the same.

I have also removed a local "all" flag which was present in the Groovie engine and cleaned up the debugflag function usage in that engine, which has removed a significant amount of redundant code.