From 8121b8eebe63b801bd545537b490112dba10a4ac Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Thu, 20 Apr 2006 05:54:25 +0000 Subject: Update resource managment, missed several changes from FF svn-id: r22049 --- engines/simon/simon.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/engines/simon/simon.cpp b/engines/simon/simon.cpp index 21af9481a8..c61bd6f2f3 100644 --- a/engines/simon/simon.cpp +++ b/engines/simon/simon.cpp @@ -2175,15 +2175,15 @@ void SimonEngine::checkNoOverWrite(byte *end) { vpe = &_vgaBufferPointers[_noOverWrite]; - if (_vgaBufFreeStart <= vpe->vgaFile1 && end >= vpe->vgaFile1End) { + if (vpe->vgaFile1 < end && vpe->vgaFile1End > _vgaBufFreeStart) { _rejectBlock = true; _rejectCount++; _vgaBufFreeStart = vpe->vgaFile1End; - } else if (_vgaBufFreeStart <= vpe->vgaFile2 && end >= vpe->vgaFile2End) { + } else if (vpe->vgaFile2 < end && vpe->vgaFile2End > _vgaBufFreeStart) { _rejectBlock = true; _rejectCount++; _vgaBufFreeStart = vpe->vgaFile2End; - } else if (_vgaBufFreeStart <= vpe->sfxFile && end >= vpe->sfxFileEnd) { + } else if (vpe->sfxFile && vpe->sfxFile < end && vpe->sfxFileEnd > _vgaBufFreeStart) { _rejectBlock = true; _rejectCount++; _vgaBufFreeStart = vpe->sfxFileEnd; @@ -2210,9 +2210,9 @@ void SimonEngine::checkZonePtrs(byte *end) { uint count = ARRAYSIZE(_vgaBufferPointers); VgaPointersEntry *vpe = _vgaBufferPointers; do { - if (_vgaBufFreeStart <= vpe->vgaFile1 && end >= vpe->vgaFile1End || - _vgaBufFreeStart <= vpe->vgaFile2 && end >= vpe->vgaFile2End || - _vgaBufFreeStart <= vpe->sfxFile && end >= vpe->sfxFileEnd) { + if (vpe->vgaFile1 < end && vpe->vgaFile1End > _vgaBufFreeStart || + vpe->vgaFile2 < end && vpe->vgaFile2End > _vgaBufFreeStart || + vpe->sfxFile < end && vpe->sfxFileEnd > _vgaBufFreeStart) { vpe->vgaFile1 = NULL; vpe->vgaFile1End = NULL; vpe->vgaFile2 = NULL; @@ -2229,15 +2229,15 @@ void SimonEngine::checkAnims(uint a, byte *end) { vpe = &_vgaBufferPointers[a]; - if (_vgaBufFreeStart <= vpe->vgaFile1 && end >= vpe->vgaFile1End) { + if (vpe->vgaFile1 < end && vpe->vgaFile1End > _vgaBufFreeStart) { _rejectBlock = true; _rejectCount++; _vgaBufFreeStart = vpe->vgaFile1End; - } else if (_vgaBufFreeStart <= vpe->vgaFile2 && end >= vpe->vgaFile2End) { + } else if (vpe->vgaFile2 < end && vpe->vgaFile2End > _vgaBufFreeStart) { _rejectBlock = true; _rejectCount++; _vgaBufFreeStart = vpe->vgaFile2End; - } else if (_vgaBufFreeStart <= vpe->sfxFile && end >= vpe->sfxFileEnd) { + } else if (vpe->sfxFile && vpe->sfxFile < end && vpe->sfxFileEnd > _vgaBufFreeStart) { _rejectBlock = true; _rejectCount++; _vgaBufFreeStart = vpe->sfxFileEnd; -- cgit v1.2.3