diff options
author | uruk | 2014-06-13 19:39:24 +0200 |
---|---|---|
committer | uruk | 2014-06-13 19:39:24 +0200 |
commit | 3aae5cfa06c0753f20631fe2843f69f08f0ae6fd (patch) | |
tree | bd0fada821d157e7ec561d73d679601b1cbce174 /engines/cge2/hero.cpp | |
parent | 235d0fffbd0f827b6dd43ba52a934417b75efbab (diff) | |
download | scummvm-rg350-3aae5cfa06c0753f20631fe2843f69f08f0ae6fd.tar.gz scummvm-rg350-3aae5cfa06c0753f20631fe2843f69f08f0ae6fd.tar.bz2 scummvm-rg350-3aae5cfa06c0753f20631fe2843f69f08f0ae6fd.zip |
CGE2: Implement Hero::hStep().
Diffstat (limited to 'engines/cge2/hero.cpp')
-rw-r--r-- | engines/cge2/hero.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/engines/cge2/hero.cpp b/engines/cge2/hero.cpp index 87e74f0bda..d2c1b64874 100644 --- a/engines/cge2/hero.cpp +++ b/engines/cge2/hero.cpp @@ -219,7 +219,20 @@ void Hero::setCurrent() { } void Hero::hStep() { - warning("STUB: Hero::hStep()"); + if (!_ignoreMap && _ext) { + Seq *seq = _ext->_seq; + int ptr = seq[_seqPtr]._next; + seq += ptr; + if (seq->_dx | seq->_dz) { + V2D p0(_vm, _pos3D._x.round(), _pos3D._z.round()); + V2D p1(_vm, p0.x + seq->_dx, p0.y + seq->_dz); + if (mapCross(p0, p1)) { + park(); + return; + } + } + } + step(); } Sprite *Hero::setContact() { |