diff options
author | Martin Kiewitz | 2016-02-21 13:58:51 +0100 |
---|---|---|
committer | Martin Kiewitz | 2016-02-21 13:59:17 +0100 |
commit | 0941dcdb6751b870392155d7a8524aa1c1567f46 (patch) | |
tree | f80ffac7d5d79532ca351d531664d46143d0e48d | |
parent | 451932d1cb886c82e36ebc901c9eeac07d83c0ed (diff) | |
download | scummvm-rg350-0941dcdb6751b870392155d7a8524aa1c1567f46.tar.gz scummvm-rg350-0941dcdb6751b870392155d7a8524aa1c1567f46.tar.bz2 scummvm-rg350-0941dcdb6751b870392155d7a8524aa1c1567f46.zip |
SCI32: Add a bit more debug info to errors + screenitems
-rw-r--r-- | engines/sci/engine/kgraphics32.cpp | 1 | ||||
-rw-r--r-- | engines/sci/graphics/frameout.cpp | 9 | ||||
-rw-r--r-- | engines/sci/graphics/screen_item32.cpp | 4 |
3 files changed, 13 insertions, 1 deletions
diff --git a/engines/sci/engine/kgraphics32.cpp b/engines/sci/engine/kgraphics32.cpp index b21161f400..cc15bb7958 100644 --- a/engines/sci/engine/kgraphics32.cpp +++ b/engines/sci/engine/kgraphics32.cpp @@ -80,6 +80,7 @@ reg_t kCantBeHere32(EngineState *s, int argc, reg_t *argv) { } reg_t kAddScreenItem(EngineState *s, int argc, reg_t *argv) { + warning("AddScreenItem %x:%x (%s)", argv[0].getSegment(), argv[0].getOffset(), g_sci->getEngineState()->_segMan->getObjectName(argv[0])); g_sci->_gfxFrameout->kernelAddScreenItem(argv[0]); return NULL_REG; } diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index 76cf4cdfe4..71ea4c536b 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -168,6 +168,8 @@ void GfxFrameout::kernelAddScreenItem(const reg_t object) { Plane *plane = _planes.findByObject(planeObject); if (plane == nullptr) { + warning("screen item %x:%x (%s)", object.getSegment(), object.getOffset(), g_sci->getEngineState()->_segMan->getObjectName(object)); + warning("plane %x:%x (%s)", planeObject.getSegment(), planeObject.getOffset(), g_sci->getEngineState()->_segMan->getObjectName(planeObject)); error("Invalid plane selector passed to kAddScreenItem"); } @@ -186,11 +188,15 @@ void GfxFrameout::kernelUpdateScreenItem(const reg_t object) { const reg_t planeObject = readSelector(_segMan, object, SELECTOR(plane)); Plane *plane = _planes.findByObject(planeObject); if (plane == nullptr) { + warning("screen item %x:%x (%s)", object.getSegment(), object.getOffset(), g_sci->getEngineState()->_segMan->getObjectName(object)); + warning("plane %x:%x (%s)", planeObject.getSegment(), planeObject.getOffset(), g_sci->getEngineState()->_segMan->getObjectName(planeObject)); error("Invalid plane selector passed to kUpdateScreenItem"); } ScreenItem *screenItem = plane->_screenItemList.findByObject(object); if (screenItem == nullptr) { + warning("screen item %x:%x (%s)", object.getSegment(), object.getOffset(), g_sci->getEngineState()->_segMan->getObjectName(object)); + warning("plane %x:%x (%s)", planeObject.getSegment(), planeObject.getOffset(), g_sci->getEngineState()->_segMan->getObjectName(planeObject)); error("Invalid screen item passed to kUpdateScreenItem"); } @@ -248,6 +254,7 @@ void GfxFrameout::kernelAddPlane(const reg_t object) { void GfxFrameout::kernelUpdatePlane(const reg_t object) { Plane *plane = _planes.findByObject(object); if (plane == nullptr) { + warning("plane %x:%x (%s)", object.getSegment(), object.getOffset(), g_sci->getEngineState()->_segMan->getObjectName(object)); error("Invalid plane selector passed to kUpdatePlane"); } @@ -258,6 +265,7 @@ void GfxFrameout::kernelUpdatePlane(const reg_t object) { void GfxFrameout::kernelDeletePlane(const reg_t object) { Plane *plane = _planes.findByObject(object); if (plane == nullptr) { + warning("plane %x:%x (%s)", object.getSegment(), object.getOffset(), g_sci->getEngineState()->_segMan->getObjectName(object)); error("Invalid plane selector passed to kDeletePlane"); } @@ -309,6 +317,7 @@ void GfxFrameout::updatePlane(Plane &plane) { void GfxFrameout::kernelAddPicAt(const reg_t planeObject, const GuiResourceId pictureId, const int16 x, const int16 y, const bool mirrorX) { Plane *plane = _planes.findByObject(planeObject); if (plane == nullptr) { + warning("plane %x:%x (%s)", planeObject.getSegment(), planeObject.getOffset(), g_sci->getEngineState()->_segMan->getObjectName(planeObject)); error("Invalid plane selector passed to kAddPicAt"); } plane->addPic(pictureId, Common::Point(x, y), mirrorX); diff --git a/engines/sci/graphics/screen_item32.cpp b/engines/sci/graphics/screen_item32.cpp index 25a403a70f..fe995a429a 100644 --- a/engines/sci/graphics/screen_item32.cpp +++ b/engines/sci/graphics/screen_item32.cpp @@ -444,7 +444,9 @@ CelObj &ScreenItem::getCelObj() { } void ScreenItem::printDebugInfo(Console *con) const { - con->debugPrintf("prio %d, x %d, y %d, z: %d, scaledX: %d, scaledY: %d flags: %d\n", + con->debugPrintf("%x:%x (%s), prio %d, x %d, y %d, z: %d, scaledX: %d, scaledY: %d flags: %d\n", + _object.getSegment(), _object.getOffset(), + g_sci->getEngineState()->_segMan->getObjectName(_object), _priority, _position.x, _position.y, |