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
This commit is contained in:
Matthew Hoops
2009-06-25 00:14:07 +00:00
parent d03dc08b64
commit 4df9dd82fb
4 changed files with 20 additions and 9 deletions
+3 -3
View File
@@ -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)
+5 -1
View File
@@ -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:
+4 -2
View File
@@ -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");
}
+8 -3
View File
@@ -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 {