MADS: Minor renamings and added display of walk nodes to debugger
This commit is contained in:
parent
71b1343adf
commit
addb3e2900
4 changed files with 24 additions and 2 deletions
|
@ -78,7 +78,7 @@ void MADSAction::checkCustomDest(int v) {
|
|||
Player &player = _vm->_game->_player;
|
||||
|
||||
if (_v86F4A && (v == -3 || _savedFields._selectedRow < 0)) {
|
||||
_vm->_game->_player._needToWalk = true;
|
||||
player._needToWalk = true;
|
||||
player._prepareWalkPos = scene._customDest;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -125,9 +125,19 @@ bool Debugger::Cmd_PlaySound(int argc, const char **argv) {
|
|||
bool Debugger::Cmd_ShowCodes(int argc, const char **argv) {
|
||||
Scene &scene = _vm->_game->_scene;
|
||||
|
||||
// Copy the depth/walk surface to the background and flag for screen refresh
|
||||
scene._depthSurface.copyTo(&scene._backgroundSurface);
|
||||
scene._spriteSlots.fullRefresh();
|
||||
|
||||
// Draw the locations of scene nodes onto the background
|
||||
int color = _vm->getRandomNumber(255);
|
||||
for (int i = 0; i < (int)scene._sceneInfo->_nodes.size(); ++i) {
|
||||
Common::Point &pt = scene._sceneInfo->_nodes[i]._walkPos;
|
||||
|
||||
scene._backgroundSurface.hLine(pt.x - 2, pt.y, pt.x + 2, color);
|
||||
scene._backgroundSurface.vLine(pt.x, pt.y - 2, pt.y + 2, color);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -768,7 +768,15 @@ void Player::newWalk() {
|
|||
}
|
||||
|
||||
void Player::addWalker(int walker, int trigger) {
|
||||
warning("TODO: Player::addWalker");
|
||||
Scene &scene = _vm->_game->_scene;
|
||||
SpriteAsset &spriteSet = *scene._sprites[_spritesStart + _spritesIdx];
|
||||
assert(spriteSet._charInfo);
|
||||
|
||||
if (walker < spriteSet._charInfo->_numEntries && _stopWalkerIndex < 11) {
|
||||
++_stopWalkerIndex;
|
||||
_stopWalkerList[_stopWalkerIndex] = walker;
|
||||
_stopWalkerTrigger[_stopWalkerIndex] = trigger;
|
||||
}
|
||||
}
|
||||
|
||||
} // End of namespace MADS
|
||||
|
|
|
@ -136,6 +136,10 @@ void Scene::loadScene(int sceneId, const Common::String &prefix, bool palFlag) {
|
|||
for (uint i = 0; i < _sceneInfo->_nodes.size(); ++i)
|
||||
_nodes.push_back(_sceneInfo->_nodes[i]);
|
||||
|
||||
// Add two more empty nodes for the start and end points of any walk sequence
|
||||
_nodes.push_back(SceneNode());
|
||||
_nodes.push_back(SceneNode());
|
||||
|
||||
// Load hotspots
|
||||
loadHotspots();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue