diff options
author | Travis Howell | 2009-04-19 01:28:27 +0000 |
---|---|---|
committer | Travis Howell | 2009-04-19 01:28:27 +0000 |
commit | d30033fc0499491487a872fd8a99738f781a9541 (patch) | |
tree | 1c80fb5fc4c2a72f4724cc74d317e2158ef03d5d /engines/agos/zones.cpp | |
parent | 3044593da01c055ad274b2ae552b8a285ce4fdb0 (diff) | |
download | scummvm-rg350-d30033fc0499491487a872fd8a99738f781a9541.tar.gz scummvm-rg350-d30033fc0499491487a872fd8a99738f781a9541.tar.bz2 scummvm-rg350-d30033fc0499491487a872fd8a99738f781a9541.zip |
Fix possible overwriting of sound data in earlier games, and cleanup.
svn-id: r40015
Diffstat (limited to 'engines/agos/zones.cpp')
-rw-r--r-- | engines/agos/zones.cpp | 53 |
1 files changed, 5 insertions, 48 deletions
diff --git a/engines/agos/zones.cpp b/engines/agos/zones.cpp index 86f2edc820..b8d2d7c04a 100644 --- a/engines/agos/zones.cpp +++ b/engines/agos/zones.cpp @@ -144,12 +144,12 @@ byte *AGOSEngine::allocBlock(uint32 size) { } void AGOSEngine::checkRunningAnims() { - VgaSprite *vsp; - if (getGameType() != GType_FF && getGameType() != GType_PP && + if ((getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) && (_videoLockOut & 0x20)) { return; } + VgaSprite *vsp; for (vsp = _vgaSprites; vsp->id; vsp++) { checkAnims(vsp->zoneNum); if (_rejectBlock == true) @@ -157,7 +157,7 @@ void AGOSEngine::checkRunningAnims() { } } -void AGOSEngine_Feeble::checkNoOverWrite() { +void AGOSEngine::checkNoOverWrite() { VgaPointersEntry *vpe; if (_noOverWrite == 0xFFFF) @@ -179,7 +179,7 @@ void AGOSEngine_Feeble::checkNoOverWrite() { } } -void AGOSEngine_Feeble::checkAnims(uint a) { +void AGOSEngine::checkAnims(uint a) { VgaPointersEntry *vpe; vpe = &_vgaBufferPointers[a]; @@ -198,7 +198,7 @@ void AGOSEngine_Feeble::checkAnims(uint a) { } } -void AGOSEngine_Feeble::checkZonePtrs() { +void AGOSEngine::checkZonePtrs() { uint count = ARRAYSIZE(_vgaBufferPointers); VgaPointersEntry *vpe = _vgaBufferPointers; do { @@ -215,49 +215,6 @@ void AGOSEngine_Feeble::checkZonePtrs() { } while (++vpe, --count); } -void AGOSEngine::checkNoOverWrite() { - VgaPointersEntry *vpe; - - if (_noOverWrite == 0xFFFF) - return; - - vpe = &_vgaBufferPointers[_noOverWrite]; - - if (((_block <= vpe->vgaFile1) && (_blockEnd >= vpe->vgaFile1)) || - ((_vgaMemPtr <= vpe->vgaFile2) && (_blockEnd >= vpe->vgaFile2))) { - _rejectBlock = true; - _vgaMemPtr = vpe->vgaFile1 + 0x5000; - } else { - _rejectBlock = false; - } -} - -void AGOSEngine::checkAnims(uint a) { - VgaPointersEntry *vpe; - - vpe = &_vgaBufferPointers[a]; - - if (((_block <= vpe->vgaFile1) && (_blockEnd >= vpe->vgaFile1)) || - ((_block <= vpe->vgaFile2) && (_blockEnd >= vpe->vgaFile2))) { - _rejectBlock = true; - _vgaMemPtr = vpe->vgaFile1 + 0x5000; - } else { - _rejectBlock = false; - } -} - -void AGOSEngine::checkZonePtrs() { - uint count = ARRAYSIZE(_vgaBufferPointers); - VgaPointersEntry *vpe = _vgaBufferPointers; - do { - if (((_block <= vpe->vgaFile1) && (_blockEnd >= vpe->vgaFile1)) || - ((_block <= vpe->vgaFile2) && (_blockEnd >= vpe->vgaFile2))) { - vpe->vgaFile1 = NULL; - vpe->vgaFile2 = NULL; - } - } while (++vpe, --count); -} - } // End of namespace AGOS |