diff options
author | Filippos Karapetis | 2012-07-04 02:17:27 +0300 |
---|---|---|
committer | Filippos Karapetis | 2012-07-04 02:21:11 +0300 |
commit | 5d3e22ae4f5fcf6c7717eb9e50767b3fbb5a10f8 (patch) | |
tree | 02ef45c50a7a571bd4e520c0ec90b590eae0e168 /engines/sci/graphics | |
parent | dc1a097e508fc4cd323314fd5dde4dfe648f7c64 (diff) | |
download | scummvm-rg350-5d3e22ae4f5fcf6c7717eb9e50767b3fbb5a10f8.tar.gz scummvm-rg350-5d3e22ae4f5fcf6c7717eb9e50767b3fbb5a10f8.tar.bz2 scummvm-rg350-5d3e22ae4f5fcf6c7717eb9e50767b3fbb5a10f8.zip |
SCI: Some cleanup of the warnings in the SCI32 plane manipulation code
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r-- | engines/sci/graphics/frameout.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index 5703579b1e..450460023c 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -326,8 +326,10 @@ void GfxFrameout::deletePlaneLine(reg_t object, reg_t hunkId) { void GfxFrameout::kernelAddScreenItem(reg_t object) { // Ignore invalid items - if (!_segMan->isObject(object)) + if (!_segMan->isObject(object)) { + warning("kernelAddScreenItem: Attempt to add an invalid object (%04x:%04x)", PRINT_REG(object)); return; + } FrameoutEntry *itemEntry = new FrameoutEntry(); memset(itemEntry, 0, sizeof(FrameoutEntry)); @@ -341,8 +343,10 @@ void GfxFrameout::kernelAddScreenItem(reg_t object) { void GfxFrameout::kernelUpdateScreenItem(reg_t object) { // Ignore invalid items - if (!_segMan->isObject(object)) + if (!_segMan->isObject(object)) { + warning("kernelUpdateScreenItem: Attempt to update an invalid object (%04x:%04x)", PRINT_REG(object)); return; + } FrameoutEntry *itemEntry = findScreenItem(object); if (!itemEntry) { @@ -372,10 +376,9 @@ void GfxFrameout::kernelUpdateScreenItem(reg_t object) { void GfxFrameout::kernelDeleteScreenItem(reg_t object) { FrameoutEntry *itemEntry = findScreenItem(object); - if (!itemEntry) { - warning("kernelDeleteScreenItem: invalid object %04x:%04x", PRINT_REG(object)); + // If the item could not be found, it may already have been deleted + if (!itemEntry) return; - } _screenItems.remove(itemEntry); delete itemEntry; |