diff options
-rw-r--r-- | engines/cge2/hero.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/engines/cge2/hero.cpp b/engines/cge2/hero.cpp index 0c28d4c7f0..5a6e437824 100644 --- a/engines/cge2/hero.cpp +++ b/engines/cge2/hero.cpp @@ -209,7 +209,16 @@ Sprite *Hero::expand(void) { // It's very similar to Sprite's expand, but doesn' } void Hero::setCurrent(void) { - warning("STUB: Hero::setCurrent()"); + double m = _vm->_eye->_z / (_pos3D._z - _vm->_eye->_z); + int h = -(V2D::trunc(m * _siz.y)); + + int i = 0; + for (; i < kDimMax; i++) { + if (h >= (_hig[i] + _hig[i + 1]) / 2) + break; + } + + _ext->_shpList = &_dim[_curDim = i]; } void Hero::hStep(void) { |