diff options
author | Filippos Karapetis | 2009-05-14 09:12:27 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-05-14 09:12:27 +0000 |
commit | 999d46b241a4aade493f76b4f3623a39c4fed930 (patch) | |
tree | 56a1c2079395ab22ccae8a003691230f073635e3 /engines/sci/scicore | |
parent | 2ca7605050c25eff88931fe523c2b005856803f1 (diff) | |
download | scummvm-rg350-999d46b241a4aade493f76b4f3623a39c4fed930.tar.gz scummvm-rg350-999d46b241a4aade493f76b4f3623a39c4fed930.tar.bz2 scummvm-rg350-999d46b241a4aade493f76b4f3623a39c4fed930.zip |
Started using game-specific flags and removed/replaced some SCI version checks with flags.
- The SCI0 new script header and the angles check have been replaced by the GF_SCI0_OLD flag
- The SCI0 new drawpic parameter and the new priority check have been replaced by the GF_SCI0_OLDGFXFUNCS flag
- Removed the code which retries to use the newer script header in SCI0 games if the detected one is wrong, as that case should be covered by the GF_SCI0_OLD flag
- Removed the leftover min_version and max_version variables from gamestate
- Cleaned up kGetTime() a bit
svn-id: r40552
Diffstat (limited to 'engines/sci/scicore')
-rw-r--r-- | engines/sci/scicore/resource.h | 1 | ||||
-rw-r--r-- | engines/sci/scicore/versions.h | 24 | ||||
-rw-r--r-- | engines/sci/scicore/vocab_debug.cpp | 10 | ||||
-rw-r--r-- | engines/sci/scicore/vocabulary.h | 2 |
4 files changed, 6 insertions, 31 deletions
diff --git a/engines/sci/scicore/resource.h b/engines/sci/scicore/resource.h index 82344da3b2..3bf5c97d05 100644 --- a/engines/sci/scicore/resource.h +++ b/engines/sci/scicore/resource.h @@ -66,7 +66,6 @@ enum ResourceStatus { #define SCI_ERROR_RESOURCE_TOO_BIG 9 /* Resource size exceeds SCI_MAX_RESOURCE_SIZE */ #define SCI_ERROR_UNSUPPORTED_VERSION 10 -#define SCI_ERROR_INVALID_SCRIPT_VERSION 11 #define SCI_ERROR_CRITICAL SCI_ERROR_NO_RESOURCE_FILES_FOUND /* the first critical error number */ diff --git a/engines/sci/scicore/versions.h b/engines/sci/scicore/versions.h index bae643066d..4739b7a3fb 100644 --- a/engines/sci/scicore/versions.h +++ b/engines/sci/scicore/versions.h @@ -46,30 +46,6 @@ namespace Sci { ** - "FTU" means "First To Use" */ -#define SCI_VERSION_FTU_NEW_SCRIPT_HEADER SCI_VERSION(0,000,395) -/* Last version known not to do this: 0.000.343 -** Old SCI versions used two word header for script blocks (first word equal -** to 0x82, meaning of the second one unknown). New SCI versions used one -** word header. -*/ - -#define SCI_VERSION_FTU_2ND_ANGLES SCI_VERSION(0,000,395) -/* Last version known not to use this: ? -** Earlier versions assign 120 degrees to left & right , and 60 to up and down. -** Later versions use an even 90 degree distribution. -*/ - -#define SCI_VERSION_FTU_NEWER_DRAWPIC_PARAMETERS SCI_VERSION(0,000,502) -/* Last version known not to do this: 0.000.435 -** Old SCI versions used to interpret the third DrawPic() parameter inversely, -** with the opposite default value (obviously) -*/ - -#define SCI_VERSION_FTU_PRIORITY_14_ZONES SCI_VERSION(0,000,502) -/* Last version known to do this: 0.000.490 - * Uses 14 zones from 42 to 190 instead of 15 zones from 42 to 200. -*/ - #define SCI_VERSION_FTU_NEW_GETTIME SCI_VERSION(0,000,629) /* These versions of SCI has a different set of subfunctions in GetTime() */ diff --git a/engines/sci/scicore/vocab_debug.cpp b/engines/sci/scicore/vocab_debug.cpp index 579f61a8de..bb157135ab 100644 --- a/engines/sci/scicore/vocab_debug.cpp +++ b/engines/sci/scicore/vocab_debug.cpp @@ -308,7 +308,7 @@ int vocabulary_get_class_count(ResourceManager *resmgr) { } #endif -bool vocabulary_get_snames(ResourceManager *resmgr, sci_version_t version, Common::StringList &selectorNames) { +bool vocabulary_get_snames(ResourceManager *resmgr, bool isOldSci0, Common::StringList &selectorNames) { int count; Resource *r = resmgr->findResource(kResourceTypeVocab, 997, 0); @@ -324,11 +324,11 @@ bool vocabulary_get_snames(ResourceManager *resmgr, sci_version_t version, Commo Common::String tmp((const char *)r->data + offset + 2, len); selectorNames.push_back(tmp); - if ((version != 0) && (version < SCI_VERSION_FTU_NEW_SCRIPT_HEADER)) { - // Early SCI versions used the LSB in the selector ID as a read/write - // toggle. To compensate for that, we add every selector name twice. + + // Early SCI versions used the LSB in the selector ID as a read/write + // toggle. To compensate for that, we add every selector name twice. + if (isOldSci0) selectorNames.push_back(tmp); - } } return true; diff --git a/engines/sci/scicore/vocabulary.h b/engines/sci/scicore/vocabulary.h index 504931b5be..2124ed36d8 100644 --- a/engines/sci/scicore/vocabulary.h +++ b/engines/sci/scicore/vocabulary.h @@ -195,7 +195,7 @@ int vocabulary_get_class_count(ResourceManager *resmgr); * Fills the given StringList with selector names. * Returns true upon success, false oterwise. */ -bool vocabulary_get_snames(ResourceManager *resmgr, sci_version_t version, Common::StringList &selectorNames); +bool vocabulary_get_snames(ResourceManager *resmgr, bool isOldSci0, Common::StringList &selectorNames); /* Look up a selector name in an array, return the index */ int vocabulary_lookup_sname(const Common::StringList &selectorNames, const char *sname); |