mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-05 00:36:57 +00:00
SCI32: Fix kSetShowStyle version checks
Fix version checks and divisions table. Now the early SQ6 demos start.
Fix version typo introduced in e23f5fe855
This commit is contained in:
parent
c3f6ccfdca
commit
5a9f14cc4e
@ -399,7 +399,7 @@ reg_t kSetShowStyle(EngineState *s, int argc, reg_t *argv) {
|
||||
// KQ7 2.0b uses a mismatched version of the Styler script (SCI2.1early script
|
||||
// for SCI2.1mid engine), so the calls it makes to kSetShowStyle are wrong and
|
||||
// put `divisions` where `pFadeArray` is supposed to be.
|
||||
if (getSciVersion() <= SCI_VERSION_1_EARLY || g_sci->getGameId() == GID_KQ7) {
|
||||
if (getSciVersion() <= SCI_VERSION_2_1_EARLY || g_sci->getGameId() == GID_KQ7) {
|
||||
blackScreen = 0;
|
||||
pFadeArray = NULL_REG;
|
||||
divisions = argc > 7 ? argv[7].toSint16() : -1;
|
||||
@ -419,7 +419,16 @@ reg_t kSetShowStyle(EngineState *s, int argc, reg_t *argv) {
|
||||
divisions = argc > 9 ? argv[9].toSint16() : -1;
|
||||
}
|
||||
|
||||
if ((getSciVersion() < SCI_VERSION_2_1_MIDDLE && g_sci->getGameId() != GID_KQ7 && type == 15) || type > 15) {
|
||||
// kShowStyleMorph (15) was introduced during SCI2.1early.
|
||||
// It appears after LSL6 and PQ4, but so far the only known
|
||||
// SCI2.1early games to use it are KQ7 and SQ6 demos.
|
||||
int maxType = 15;
|
||||
if (getSciVersion() < SCI_VERSION_2_1_EARLY ||
|
||||
g_sci->getGameId() == GID_LSL6 ||
|
||||
g_sci->getGameId() == GID_PQ4) {
|
||||
maxType = 14;
|
||||
}
|
||||
if (type > maxType) {
|
||||
error("Illegal show style %d for plane %04x:%04x", type, PRINT_REG(planeObj));
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,8 @@ static int dissolveSequences[2][20] = {
|
||||
/* SCI2.1mid+ */ { 0, 0, 3, 6, 12, 20, 48, 96, 184, 272, 576, 1280, 3232, 6912, 13568, 24576, 46080, 73728, 132096, 466944 }
|
||||
};
|
||||
static int16 divisionsDefaults[2][16] = {
|
||||
/* SCI2.1early- */ { 1, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 40, 40, 101, 101 },
|
||||
// the last element in SCI2.1early was added after LSL6 and PQ4
|
||||
/* SCI2.1early- */ { 1, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 40, 40, 101, 101, 2 },
|
||||
/* SCI2.1mid+ */ { 1, 20, 20, 20, 20, 10, 10, 10, 10, 20, 20, 6, 10, 101, 101, 2 }
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user