aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorMatthew Hoops2009-06-25 00:14:07 +0000
committerMatthew Hoops2009-06-25 00:14:07 +0000
commit4df9dd82fb2a4e9f5772368ec869788e64e380ff (patch)
tree64e54ff4445407706a9daa40e7cf72ba1bdd8ad8 /engines/sci
parentd03dc08b64073044267fb4b3ca6704fd62a19741 (diff)
downloadscummvm-rg350-4df9dd82fb2a4e9f5772368ec869788e64e380ff.tar.gz
scummvm-rg350-4df9dd82fb2a4e9f5772368ec869788e64e380ff.tar.bz2
scummvm-rg350-4df9dd82fb2a4e9f5772368ec869788e64e380ff.zip
After discussing with waltervn, committing my fix for the King's Quest I Demo (original from Patch #2795916). I'm also fixing the full game as well :)
svn-id: r41841
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/detection.cpp6
-rw-r--r--engines/sci/engine/kernel.cpp6
-rw-r--r--engines/sci/sci.cpp6
-rw-r--r--engines/sci/sci.h11
4 files changed, 20 insertions, 9 deletions
diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp
index e0314dcb43..bdf2c7c72a 100644
--- a/engines/sci/detection.cpp
+++ b/engines/sci/detection.cpp
@@ -953,9 +953,9 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "59b13619078bd47011421468959ee5d4", 954},
{"resource.001", 0, "4cfb9040db152868f7cb6a1e8151c910", 296555},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- 0,
+ GF_SCI0_SCI1VOCAB,
SCI_VERSION_AUTODETECT,
- SCI_VERSION_01
+ SCI_VERSION_0
},
// King's Quest 1 SCI Remake - English DOS (from the King's Quest Collection)
@@ -969,7 +969,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
0,
SCI_VERSION_AUTODETECT,
- SCI_VERSION_01
+ SCI_VERSION_0
},
// King's Quest 4 - English Amiga (from www.back2roots.org)
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp
index baf45d80c7..eafc6dbd4d 100644
--- a/engines/sci/engine/kernel.cpp
+++ b/engines/sci/engine/kernel.cpp
@@ -945,7 +945,11 @@ bool Kernel::loadKernelNames() {
switch (_resmgr->_sciVersion) {
case SCI_VERSION_0:
case SCI_VERSION_01:
- vocab_get_knames0(_resmgr, _kernelNames);
+ // HACK: The KQ1 demo requires the SCI1 vocabulary.
+ if (((SciEngine*)g_engine)->getFlags() & GF_SCI0_SCI1VOCAB)
+ vocab_get_knames1(_resmgr, _kernelNames);
+ else
+ vocab_get_knames0(_resmgr, _kernelNames);
break;
case SCI_VERSION_01_VGA:
case SCI_VERSION_01_VGA_ODD:
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp
index f58d729bf6..9b277b058f 100644
--- a/engines/sci/sci.cpp
+++ b/engines/sci/sci.cpp
@@ -158,7 +158,8 @@ Common::Error SciEngine::run() {
if (flags & GF_SCI0_OLD ||
flags & GF_SCI0_OLDGFXFUNCS ||
- flags & GF_SCI0_OLDGETTIME) {
+ flags & GF_SCI0_OLDGETTIME ||
+ flags & GF_SCI0_SCI1VOCAB) {
error("This game entry is erroneous. It's marked as SCI1, but it has SCI0 flags set");
}
} else if (version == SCI_VERSION_1_1 || version == SCI_VERSION_32) {
@@ -170,7 +171,8 @@ Common::Error SciEngine::run() {
if (flags & GF_SCI0_OLD ||
flags & GF_SCI0_OLDGFXFUNCS ||
- flags & GF_SCI0_OLDGETTIME) {
+ flags & GF_SCI0_OLDGETTIME ||
+ flags & GF_SCI0_SCI1VOCAB) {
error("This game entry is erroneous. It's marked as SCI1.1/SCI32, but it has SCI0 flags set");
}
diff --git a/engines/sci/sci.h b/engines/sci/sci.h
index 91f491fe71..18b1b93a92 100644
--- a/engines/sci/sci.h
+++ b/engines/sci/sci.h
@@ -108,6 +108,11 @@ enum SciGameFlags {
** Older SCI versions had simpler code for GetTime()
*/
GF_SCI0_OLDGETTIME = (1 << 2),
+
+ /* Applies to any game that requires the SCI1 kernel vocab
+ ** Some games (such as the King's Quest I demo) require the default kernel vocab table.
+ */
+ GF_SCI0_SCI1VOCAB = (1 << 3),
// ----------------------------------------------------------------------------
@@ -118,18 +123,18 @@ enum SciGameFlags {
/*
** Used to distinguish SCI1 EGA games
*/
- GF_SCI1_EGA = (1 << 3),
+ GF_SCI1_EGA = (1 << 4),
/* Applies to all SCI1 versions after 1.000.200
** In late SCI1 versions, the argument of lofs[as] instructions
** is absolute rather than relative.
*/
- GF_SCI1_LOFSABSOLUTE = (1 << 4),
+ GF_SCI1_LOFSABSOLUTE = (1 << 5),
/* Applies to all versions from 1.000.510 onwards
** kDoSound() is different than in earlier SCI1 versions.
*/
- GF_SCI1_NEWDOSOUND = (1 << 5)
+ GF_SCI1_NEWDOSOUND = (1 << 6)
};
class SciEngine : public Engine {