ALL: revert accidental commits

This commit is contained in:
athrxx 2019-06-21 14:18:03 +02:00
parent 08dba769f1
commit 80f163b0fc
7 changed files with 470 additions and 1139 deletions

View file

@ -707,29 +707,7 @@ int FWScript::execute() {
if (_script._size) { if (_script._size) {
while (!ret) { while (!ret) {
_line = _pos;
if (g_cine->getGameType() == Cine::GType_OS) {
if (_pos == 0x0f9a) {
if (!scumm_stricmp(currentPrcName, "AUTO00.PRC"))
g_cine->_globalVars[200] = g_cine->_objectTable[235].costume;
}
} else {
if (_pos == 0x2c) {
if (g_cine->_objectTable[1].x == 0x0131) {
if (!scumm_stricmp(currentPrcName, "TOTO.PRC"))
g_cine->_objectTable[2].x = 0x02;
}
} /*else if (!scumm_stricmp(currentPrcName, "CODE2.PRC")) {
if (_pos == 1) {
//globalVars[0] = objectTable[scriptElement->scriptPtr[6]].frame;
} else if (_pos == 504) {
//_currentScriptElement->localVars[1] = _currentScriptElement->localVars[2] = 0;
//globalVars[251] = 0;
g_cine->_globalVars[251] = g_cine->_globalVars[251];
}
}*/
}
byte opcode = getNextByte(); byte opcode = getNextByte();
OpFunc handler = _info->opcodeHandler(opcode); OpFunc handler = _info->opcodeHandler(opcode);

View file

@ -892,8 +892,6 @@ void AudioMaster2ResourceManager::initResource(SoundResource *resource) {
if (!resource) if (!resource)
return; return;
Common::StackLock lock(_mutex);
SoundResource *res = retrieveFromChain(resource->getName()); SoundResource *res = retrieveFromChain(resource->getName());
// The driver does not replace resources with the same name, but disposes the new resource instead. // The driver does not replace resources with the same name, but disposes the new resource instead.
// So these names seem to be considered "globally unique". // So these names seem to be considered "globally unique".
@ -1286,7 +1284,7 @@ void AudioMaster2Internal::fadeOut(int delay) {
} }
bool AudioMaster2Internal::isFading() { bool AudioMaster2Internal::isFading() {
return _ready ? _io->isFading() : false; return _io->isFading();
} }
void AudioMaster2Internal::setMusicVolume(int volume) { void AudioMaster2Internal::setMusicVolume(int volume) {
@ -1315,18 +1313,18 @@ void AudioMaster2Internal::resetCounter() {
} }
int AudioMaster2Internal::getPlayDuration() { int AudioMaster2Internal::getPlayDuration() {
return _ready ? _durationCounter : 0; return _durationCounter;
} }
void AudioMaster2Internal::sync(SoundResource *res) { void AudioMaster2Internal::sync(SoundResource *res) {
if (!_ready || !res) if (!_ready || !res)
return; return;
Common::StackLock lock(_mutex);
if (res->getType() != 1) if (res->getType() != 1)
return; return;
Common::StackLock lock(_mutex);
SoundResourceSMUS *smus = static_cast<SoundResourceSMUS*>(res); SoundResourceSMUS *smus = static_cast<SoundResourceSMUS*>(res);
_io->_tempo = smus->getTempo(); _io->_tempo = smus->getTempo();
smus->setSync(_io->_sync); smus->setSync(_io->_sync);

View file

@ -257,10 +257,6 @@ reg_t kDisposeClone(EngineState *s, int argc, reg_t *argv) {
// Returns script dispatch address index in the supplied script // Returns script dispatch address index in the supplied script
reg_t kScriptID(EngineState *s, int argc, reg_t *argv) { reg_t kScriptID(EngineState *s, int argc, reg_t *argv) {
int script = argv[0].toUint16(); int script = argv[0].toUint16();
if (Sci::g_sci->getGameId() == GID_KQ4 && script == 701)
script--;
uint16 index = (argc > 1) ? argv[1].toUint16() : 0; uint16 index = (argc > 1) ? argv[1].toUint16() : 0;
if (argv[0].getSegment()) if (argv[0].getSegment())

View file

@ -5255,24 +5255,6 @@ static const uint16 laurabow1PatchLeftStairsLockupFix[] = {
PATCH_END PATCH_END
}; };
// Copy Protection
static const uint16 laurabow1SignatureCp[] = {
SIG_MAGICDWORD,
0x30, 0x48, 0x00, 0x8f, 0x01, 0x8d, 0x00, 0x35, 0x04, 0x06,
0x93, 0x05, 0x1e, 0x30, 0x36, 0x00, 0x8f, 0x02, 0x8d, 0x00,
SIG_END
};
static const uint16 laurabow1PatchCp[] = {
0x39, 0x00, 0xab, 0x00, 0x39, 0x00, 0xab, 0x01, 0x39, 0x00,
0xab, 0x35, 0x39, 0x27, 0xaf, 0x01, 0x39, 0x27, 0xaf, 0x02,
PATCH_GETORIGINALBYTE(0), PATCH_GETORIGINALBYTE(1), PATCH_GETORIGINALBYTE(2),
PATCH_GETORIGINALBYTE(3), PATCH_GETORIGINALBYTE(4), PATCH_GETORIGINALBYTE(5),
PATCH_GETORIGINALBYTE(6), PATCH_GETORIGINALBYTE(7), PATCH_GETORIGINALBYTE(8),
PATCH_GETORIGINALBYTE(9), PATCH_GETORIGINALBYTE(10),
PATCH_END
};
// script, description, signature patch // script, description, signature patch
static const SciScriptPatcherEntry laurabow1Signatures[] = { static const SciScriptPatcherEntry laurabow1Signatures[] = {
{ true, 4, "easter egg view fix", 1, laurabow1SignatureEasterEggViewFix, laurabow1PatchEasterEggViewFix }, { true, 4, "easter egg view fix", 1, laurabow1SignatureEasterEggViewFix, laurabow1PatchEasterEggViewFix },
@ -5285,7 +5267,6 @@ static const SciScriptPatcherEntry laurabow1Signatures[] = {
{ true, 58, "chapel candles persistence", 1, laurabow1SignatureChapelCandlesPersistence, laurabow1PatchChapelCandlesPersistence }, { true, 58, "chapel candles persistence", 1, laurabow1SignatureChapelCandlesPersistence, laurabow1PatchChapelCandlesPersistence },
{ true, 236, "tell Lilly about Gertie blocking fix 1/2", 1, laurabow1SignatureTellLillyAboutGerieBlockingFix1, laurabow1PatchTellLillyAboutGertieBlockingFix1 }, { true, 236, "tell Lilly about Gertie blocking fix 1/2", 1, laurabow1SignatureTellLillyAboutGerieBlockingFix1, laurabow1PatchTellLillyAboutGertieBlockingFix1 },
{ true, 236, "tell Lilly about Gertie blocking fix 2/2", 1, laurabow1SignatureTellLillyAboutGerieBlockingFix2, laurabow1PatchTellLillyAboutGertieBlockingFix2 }, { true, 236, "tell Lilly about Gertie blocking fix 2/2", 1, laurabow1SignatureTellLillyAboutGerieBlockingFix2, laurabow1PatchTellLillyAboutGertieBlockingFix2 },
{ true, 414, "copy protection", 1, laurabow1SignatureCp, laurabow1PatchCp },
{ true, 998, "obstacle collision lockups fix", 1, laurabow1SignatureObstacleCollisionLockupsFix, laurabow1PatchObstacleCollisionLockupsFix }, { true, 998, "obstacle collision lockups fix", 1, laurabow1SignatureObstacleCollisionLockupsFix, laurabow1PatchObstacleCollisionLockupsFix },
SCI_SIGNATUREENTRY_TERMINATOR SCI_SIGNATUREENTRY_TERMINATOR
}; };
@ -14024,44 +14005,6 @@ static const SciScriptPatcherEntry torinSignatures[] = {
#endif #endif
// Copy Protection
static const uint16 pq2EnSignatureCp[] = {
SIG_MAGICDWORD,
0x35, 0x07, 0x12, 0xa5,
SIG_ADDTOOFFSET(67),
0x30, 0xcf, 0x00, 0x35,
SIG_END
};
static const uint16 pq2EnPatchCp[] = {
0x35, 0x00, 0x12, 0xa5,
PATCH_ADDTOOFFSET(67),
0x30, 0x00, 0x00, 0x35,
PATCH_END
};
static const uint16 pq2JpSignatureCp[] = {
SIG_MAGICDWORD,
0x35, 0x07, 0x12, 0xa5,
SIG_ADDTOOFFSET(75),
0x30, 0xcf, 0x00, 0x35,
SIG_END
};
static const uint16 pq2JpPatchCp[] = {
0x35, 0x00, 0x12, 0xa5,
PATCH_ADDTOOFFSET(75),
0x30, 0x00, 0x00, 0x35,
PATCH_END
};
static const SciScriptPatcherEntry pq2Signatures[] = {
{ true, 701, "copy protection", 1, pq2EnSignatureCp, pq2EnPatchCp },
{ true, 701, "copy protection", 1, pq2JpSignatureCp, pq2JpPatchCp },
SCI_SIGNATUREENTRY_TERMINATOR
};
// ================================================================================= // =================================================================================
ScriptPatcher::ScriptPatcher() { ScriptPatcher::ScriptPatcher() {
@ -14593,9 +14536,6 @@ void ScriptPatcher::processScript(uint16 scriptNr, SciSpan<byte> scriptData) {
case GID_PQ1: case GID_PQ1:
signatureTable = pq1vgaSignatures; signatureTable = pq1vgaSignatures;
break; break;
case GID_PQ2:
signatureTable = pq2Signatures;
break;
case GID_PQ3: case GID_PQ3:
signatureTable = pq3Signatures; signatureTable = pq3Signatures;
break; break;

File diff suppressed because it is too large Load diff

View file

@ -1343,7 +1343,6 @@ int MidiDriver_PC9801::open() {
return MERR_CANNOT_CONNECT; return MERR_CANNOT_CONNECT;
_pc98a->setSoundEffectChanMask(0); _pc98a->setSoundEffectChanMask(0);
_pc98a->ssgSetVolume(205); _pc98a->ssgSetVolume(205);
_pc98a->writeReg(0, 0x26, 256 - _baseTempo / 288);
_ready = true; _ready = true;
} }

View file

@ -84,9 +84,8 @@ void SciMusic::init() {
if (g_sci->_features->useAltWinGMSound()) if (g_sci->_features->useAltWinGMSound())
deviceFlags |= MDT_PREFER_GM; deviceFlags |= MDT_PREFER_GM;
// SCI_VERSION_0_EARLY games apparently don't support the CMS. At least there // Currently our CMS implementation only supports SCI1(.1)
// is no patch resource 101 and I also haven't seen any CMS driver file so far. if (getSciVersion() >= SCI_VERSION_1_EGA_ONLY && getSciVersion() <= SCI_VERSION_1_1)
if (getSciVersion() > SCI_VERSION_0_EARLY && getSciVersion() <= SCI_VERSION_1_1)
deviceFlags |= MDT_CMS; deviceFlags |= MDT_CMS;
if (g_sci->getPlatform() == Common::kPlatformFMTowns) { if (g_sci->getPlatform() == Common::kPlatformFMTowns) {