diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/agos/agos.h | 2 | ||||
-rw-r--r-- | engines/sci/engine/seg_manager.cpp | 6 | ||||
-rw-r--r-- | engines/scumm/he/script_v100he.cpp | 22 | ||||
-rw-r--r-- | engines/scumm/he/script_v80he.cpp | 5 | ||||
-rw-r--r-- | engines/scumm/he/sprite_he.cpp | 10 | ||||
-rw-r--r-- | engines/scumm/input.cpp | 12 | ||||
-rw-r--r-- | engines/scumm/sound.cpp | 4 | ||||
-rw-r--r-- | engines/tinsel/adpcm.cpp | 2 |
8 files changed, 45 insertions, 18 deletions
diff --git a/engines/agos/agos.h b/engines/agos/agos.h index b1d2e6d735..359dfd5ff1 100644 --- a/engines/agos/agos.h +++ b/engines/agos/agos.h @@ -56,7 +56,7 @@ class SeekableReadStream; } namespace Graphics { -class Surface; +struct Surface; } namespace AGOS { diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp index ab67da32db..1510af8508 100644 --- a/engines/sci/engine/seg_manager.cpp +++ b/engines/sci/engine/seg_manager.cpp @@ -28,12 +28,6 @@ namespace Sci { -enum { - DEFAULT_SCRIPTS = 32, - DEFAULT_OBJECTS = 8, ///< default number of objects per script - DEFAULT_OBJECTS_INCREMENT = 4 ///< Number of additional objects to instantiate if we're running out of them -}; - SegManager::SegManager(ResourceManager *resMan) { _heap.push_back(0); diff --git a/engines/scumm/he/script_v100he.cpp b/engines/scumm/he/script_v100he.cpp index 5a9172ff8a..56ea10f507 100644 --- a/engines/scumm/he/script_v100he.cpp +++ b/engines/scumm/he/script_v100he.cpp @@ -542,7 +542,7 @@ void ScummEngine_v100he::o100_arrayOps() { int dim1end, dim1start, dim2end, dim2start; int id, len, b, c, list[128]; int offs, tmp, tmp2; - uint tmp3; + uint tmp3, type; byte subOp = fetchScriptByte(); int array = fetchScriptWord(); @@ -625,11 +625,10 @@ void ScummEngine_v100he::o100_arrayOps() { } break; case 132: - debug(0, "o100_arrayOps: case 132"); - // TODO: Used by Moonbase Commander + // TODO: Used by room 2 script 2180 in Moonbase Commander fetchScriptWord(); fetchScriptWord(); - pop(); + type = pop(); pop(); pop(); pop(); @@ -646,6 +645,21 @@ void ScummEngine_v100he::o100_arrayOps() { if (id == 0) { defineArray(array, kDwordArray, dim2start, dim2end, dim1start, dim1end); } + switch (type) { + case 1: + break; + case 2: + break; + case 3: + break; + case 4: + break; + case 5: + break; + default: + error("o100_arrayOps: case 132 unknown type %d)", type); + } + debug(0, "o100_arrayOps: case 132 type %d", type); break; case 133: b = pop(); diff --git a/engines/scumm/he/script_v80he.cpp b/engines/scumm/he/script_v80he.cpp index 7970d7806f..9711f6415b 100644 --- a/engines/scumm/he/script_v80he.cpp +++ b/engines/scumm/he/script_v80he.cpp @@ -171,7 +171,10 @@ void ScummEngine_v80he::o80_readConfigFile() { case 6: // number ConfFile.getKey((const char *)option, (const char *)section, entry); - push(atoi(entry.c_str())); + if (!strcmp((char *)option, "Benchmark")) + push(2); + else + push(atoi(entry.c_str())); break; case 77: // HE 100 case 7: // string diff --git a/engines/scumm/he/sprite_he.cpp b/engines/scumm/he/sprite_he.cpp index 0b37673e4a..081110c7cd 100644 --- a/engines/scumm/he/sprite_he.cpp +++ b/engines/scumm/he/sprite_he.cpp @@ -804,12 +804,18 @@ void Sprite::setSpriteImage(int spriteId, int imageNum) { if (_spriteTable[spriteId].image) { _spriteTable[spriteId].imageStateCount = _vm->_wiz->getWizImageStates(_spriteTable[spriteId].image); - _spriteTable[spriteId].flags |= kSFActive | kSFAutoAnim | kSFMarkDirty | kSFBlitDirectly; + + if (_vm->VAR(139)) + _spriteTable[spriteId].flags |= kSFActive; + else + _spriteTable[spriteId].flags |= kSFActive | kSFAutoAnim | kSFMarkDirty | kSFBlitDirectly; if (_spriteTable[spriteId].image != origResId || _spriteTable[spriteId].imageStateCount != origResWizStates) _spriteTable[spriteId].flags |= kSFChanged | kSFNeedRedraw; } else { - if (_spriteTable[spriteId].flags & kSFImageless) + if (_vm->VAR(139)) + _spriteTable[spriteId].flags &= ~kSFActive; + else if (_spriteTable[spriteId].flags & kSFImageless) _spriteTable[spriteId].flags = 0; else _spriteTable[spriteId].flags = kSFChanged | kSFBlitDirectly; diff --git a/engines/scumm/input.cpp b/engines/scumm/input.cpp index 5eea7acc6b..6d9e1f3f72 100644 --- a/engines/scumm/input.cpp +++ b/engines/scumm/input.cpp @@ -324,7 +324,17 @@ void ScummEngine::processInput() { VAR(VAR_LEFTBTN_HOLD) = (_leftBtnPressed & msDown) != 0; VAR(VAR_RIGHTBTN_HOLD) = (_rightBtnPressed & msDown) != 0; - if (_game.version >= 7) { + if (_game.heversion >= 72) { + // HE72 introduced a flag for whether or not this is a click + // or the player is continuing to hold the button down. + // 0x80 signifies that the button is continuing to be held down + // Backyard Soccer needs this in order to function + if (VAR(VAR_LEFTBTN_HOLD) && !(_leftBtnPressed & msClicked)) + VAR(VAR_LEFTBTN_HOLD) |= 0x80; + + if (VAR(VAR_RIGHTBTN_HOLD) && !(_rightBtnPressed & msClicked)) + VAR(VAR_RIGHTBTN_HOLD) |= 0x80; + } else if (_game.version >= 7) { VAR(VAR_LEFTBTN_DOWN) = (_leftBtnPressed & msClicked) != 0; VAR(VAR_RIGHTBTN_DOWN) = (_rightBtnPressed & msClicked) != 0; } diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp index 33db70985d..50ae045052 100644 --- a/engines/scumm/sound.cpp +++ b/engines/scumm/sound.cpp @@ -1144,10 +1144,10 @@ int ScummEngine::readSoundResource(ResId idx) { break; } - // We only allow SPK resources for PC Speaker, PCJr and CMS here + // We only allow SPK resources for PC Speaker and PCJr here // since other resource would sound horribly with their output // drivers. - if ((_sound->_musicType == MDT_PCSPK || _sound->_musicType == MDT_PCJR || _sound->_musicType == MDT_CMS) && pri != 11) + if ((_sound->_musicType == MDT_PCSPK || _sound->_musicType == MDT_PCJR) && pri != 11) pri = -1; // We only allow ADL resources when AdLib or FM-Towns is used as diff --git a/engines/tinsel/adpcm.cpp b/engines/tinsel/adpcm.cpp index 4ea835586b..ca3150ca3d 100644 --- a/engines/tinsel/adpcm.cpp +++ b/engines/tinsel/adpcm.cpp @@ -61,7 +61,7 @@ void Tinsel_ADPCMStream::readBufferTinselHeader() { int16 Tinsel_ADPCMStream::decodeTinsel(int16 code, double eVal) { double sample; - sample = (double) code; + sample = (double)code; sample *= eVal * _status.predictor; sample += (_status.d0 * _status.K0) + (_status.d1 * _status.K1); |