aboutsummaryrefslogtreecommitdiff
path: root/engines/m4
diff options
context:
space:
mode:
authorPaul Gilbert2010-07-24 01:07:04 +0000
committerPaul Gilbert2010-07-24 01:07:04 +0000
commitcd66b7d11b4a1f3082b62d440e1b010a40be94b5 (patch)
treec5be61e3bdcc2ed023a53051f23968d191897d5f /engines/m4
parent1867b44bf4fd9e1cfb9861f7e0e3ed65ba5144a7 (diff)
downloadscummvm-rg350-cd66b7d11b4a1f3082b62d440e1b010a40be94b5.tar.gz
scummvm-rg350-cd66b7d11b4a1f3082b62d440e1b010a40be94b5.tar.bz2
scummvm-rg350-cd66b7d11b4a1f3082b62d440e1b010a40be94b5.zip
M4: Enhanced the show_codes debug command to also show a scene's walking points
svn-id: r51230
Diffstat (limited to 'engines/m4')
-rw-r--r--engines/m4/scene.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/engines/m4/scene.cpp b/engines/m4/scene.cpp
index ca59710586..08d79f0f66 100644
--- a/engines/m4/scene.cpp
+++ b/engines/m4/scene.cpp
@@ -154,8 +154,21 @@ void Scene::showCodes() {
colors[255 * 4 + 2] = 255;
_vm->_palette->setPalette(colors, 0, 256);
} else {
- // For MADS, simply copy the walk data to the background, in whatever current palette is active
+ // MADS handling
+
+ // copy the walk data to the background, in whatever current palette is active
_walkSurface->copyTo(_backgroundSurface);
+
+ // Show all the scene's walk nodes
+ SceneNodeList &nodeList = _madsVm->scene()->getSceneResources()._nodes;
+ _backgroundSurface->setColour(_madsVm->_palette->WHITE);
+ for (uint i = 0; i < nodeList.size() - 2; ++i) {
+ // Draw a little cross at the node's position
+ _backgroundSurface->hLine(nodeList[i].pt.x - 2, nodeList[i].pt.x + 2, nodeList[i].pt.y);
+ _backgroundSurface->vLine(nodeList[i].pt.x, nodeList[i].pt.y - 2, nodeList[i].pt.y + 2);
+ }
+
+ ((MadsScene *)this)->_spriteSlots.fullRefresh();
}
}