From c3cb4c92a8224d1e892871bd8ab26b3d0cf0e6a9 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 24 Nov 2010 14:38:08 +0000 Subject: SCI: Placed some selectors added in SCI1.1 in a separate table svn-id: r54458 --- engines/sci/engine/static_selectors.cpp | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) (limited to 'engines') diff --git a/engines/sci/engine/static_selectors.cpp b/engines/sci/engine/static_selectors.cpp index ed8d4193a9..4bb61a0658 100644 --- a/engines/sci/engine/static_selectors.cpp +++ b/engines/sci/engine/static_selectors.cpp @@ -64,6 +64,12 @@ static const char * const sci1Selectors[] = { "frame", "vol", "pri", "perform", "moveDone" // 93 - 97 }; +static const char * const sci11Selectors[] = { + "topString", "flags", "quitGame", "restart", "hide", // 98 - 102 + "scaleSignal", "scaleX", "scaleY", "maxScale","vanishingX", // 103 - 107 + "vanishingY" // 108 +}; + #ifdef ENABLE_SCI32 static const char * const sci2Selectors[] = { "plane", "x", "y", "z", "scaleX", // 0 - 4 @@ -108,17 +114,6 @@ static const SelectorRemap sciSelectorRemap[] = { // SCI1.1 { SCI_VERSION_1_1, SCI_VERSION_1_1, "nodePtr", 41 }, { SCI_VERSION_1_1, SCI_VERSION_1_1, "cantBeHere", 54 }, - { SCI_VERSION_1_1, SCI_VERSION_1_1, "topString", 98 }, - { SCI_VERSION_1_1, SCI_VERSION_1_1, "flags", 99 }, - // quitGame - // restart - // hide - { SCI_VERSION_1_1, SCI_VERSION_1_1,"scaleSignal", 103 }, - { SCI_VERSION_1_1, SCI_VERSION_1_1, "scaleX", 104 }, - { SCI_VERSION_1_1, SCI_VERSION_1_1, "scaleY", 105 }, - { SCI_VERSION_1_1, SCI_VERSION_1_1, "maxScale", 106 }, - { SCI_VERSION_1_1, SCI_VERSION_1_1, "vanishingX", 107 }, - { SCI_VERSION_1_1, SCI_VERSION_1_1, "vanishingY", 108 }, { SCI_VERSION_1_1, SCI_VERSION_2_1, "-info-",4103 }, { SCI_VERSION_NONE, SCI_VERSION_NONE, 0, 0 } }; @@ -132,10 +127,12 @@ Common::StringArray Kernel::checkStaticSelectorNames() { #else const int count = ARRAYSIZE(sci0Selectors) + offset; #endif + int countSci1 = ARRAYSIZE(sci1Selectors); + int countSci11 = ARRAYSIZE(sci11Selectors); // Resize the list of selector names and fill in the SCI 0 names. names.resize(count); - if (getSciVersion() < SCI_VERSION_1_1) { + if (getSciVersion() <= SCI_VERSION_1_LATE) { // Fill selectors 0 - 2 for SCI0 - SCI1 late names[0] = "species"; names[1] = "superClass"; @@ -149,12 +146,18 @@ Common::StringArray Kernel::checkStaticSelectorNames() { if (getSciVersion() > SCI_VERSION_01) { // Several new selectors were added in SCI 1 and later. - int count2 = ARRAYSIZE(sci1Selectors); - names.resize(count + count2); - for (int i = count; i < count + count2; i++) + names.resize(count + countSci1); + for (int i = count; i < count + countSci1; i++) names[i] = sci1Selectors[i - count]; } + if (getSciVersion() >= SCI_VERSION_1_1) { + // Several new selectors were added in SCI 1.1 + names.resize(count + countSci1 + countSci11); + for (int i = count + countSci1; i < count + countSci1 + countSci11; i++) + names[i] = sci11Selectors[i - count - countSci1]; + } + // Now, we need to find out selectors which keep changing place... // We do that by dissecting game objects, and looking for selectors at // specified locations. -- cgit v1.2.3