diff options
author | lukaslw | 2014-10-08 17:39:10 +0200 |
---|---|---|
committer | lukaslw | 2014-10-08 17:39:10 +0200 |
commit | 0e70ffaf59044402973eb88ec32f338c522491e3 (patch) | |
tree | af01c3a3cccea91ad844d2ce87193b54ab9d8535 /engines/prince/flags.h | |
parent | dcb85739fffbfcb9b1da72ecbfcb048875f93d62 (diff) | |
download | scummvm-rg350-0e70ffaf59044402973eb88ec32f338c522491e3.tar.gz scummvm-rg350-0e70ffaf59044402973eb88ec32f338c522491e3.tar.bz2 scummvm-rg350-0e70ffaf59044402973eb88ec32f338c522491e3.zip |
PRINCE: Flags::getFlagName - debugging function
Faster searching by changing switch to bsearch and array
Diffstat (limited to 'engines/prince/flags.h')
-rw-r--r-- | engines/prince/flags.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/engines/prince/flags.h b/engines/prince/flags.h index efa97eb5ed..706f72826a 100644 --- a/engines/prince/flags.h +++ b/engines/prince/flags.h @@ -27,10 +27,9 @@ namespace Prince { -struct Flags { - - // TODO: Remove from release build - // useful just for debugging +class Flags { +public: + static int compareFlagDebug(const void *a, const void *b); static const char *getFlagName(uint16 flagId); enum Id { @@ -408,6 +407,14 @@ struct Flags { NOCLSTEXT = 0x846E, ESCAPED2 = 0x8470 }; + + struct FlagDebug { + Id id; + char flagName[30]; + }; + + static const int kFlagDebugAmount = 368; + static const FlagDebug _flagNames[kFlagDebugAmount]; }; } // End of namespace Prince |