From fed9e3e2df083ac86d513d7ba3b08bfca76a272b Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 31 Aug 2009 21:50:14 +0000 Subject: Cleanup svn-id: r43869 --- engines/sci/engine/static_selectors.cpp | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) (limited to 'engines') diff --git a/engines/sci/engine/static_selectors.cpp b/engines/sci/engine/static_selectors.cpp index 532c750032..1ff5dd8c2e 100644 --- a/engines/sci/engine/static_selectors.cpp +++ b/engines/sci/engine/static_selectors.cpp @@ -90,10 +90,6 @@ static const SelectorRemap sci11SelectorRemap[] = { { "syncTime", 279 }, { "syncCue", 280 } }; -// A macro for loading one of the above tables in the function below -#define USE_SELECTOR_TABLE(x) \ - - Common::StringList Kernel::checkStaticSelectorNames(SciVersion version) { Common::StringList names; int offset = (version < SCI_VERSION_1_1) ? 3 : 0; @@ -108,7 +104,9 @@ Common::StringList Kernel::checkStaticSelectorNames(SciVersion version) { for (i = offset; i < count; i++) names[i] = sci0Selectors[i - offset]; - if (version >= SCI_VERSION_1_EGA) { + if (version <= SCI_VERSION_01) { + selectorRemap = sci0SelectorRemap; + } else { int count2 = ARRAYSIZE(sci1Selectors); names[handleIndex + offset] = "nodePtr"; names[canBeHereIndex + offset] = "cantBeHere"; @@ -116,19 +114,14 @@ Common::StringList Kernel::checkStaticSelectorNames(SciVersion version) { for (i = count; i < count + count2; i++) names[i] = sci1Selectors[i - count]; - } - if (version <= SCI_VERSION_01) - selectorRemap = sci0SelectorRemap; - else if (version >= SCI_VERSION_1_EGA && version <= SCI_VERSION_1_LATE) - selectorRemap = sci1SelectorRemap; - else - selectorRemap = sci11SelectorRemap; + selectorRemap = (version < SCI_VERSION_1_1) ? sci1SelectorRemap : sci11SelectorRemap; + } for (uint32 k = 0; k < ARRAYSIZE(selectorRemap); k++) { - if (selectorRemap[k].slot >= names.size()) \ - names.resize(selectorRemap[k].slot + 1); \ - names[selectorRemap[k].slot] = selectorRemap[k].name; \ + if (selectorRemap[k].slot >= names.size()) + names.resize(selectorRemap[k].slot + 1); + names[selectorRemap[k].slot] = selectorRemap[k].name; } return names; -- cgit v1.2.3