diff options
author | uruk | 2014-06-08 07:41:25 +0200 |
---|---|---|
committer | uruk | 2014-06-08 07:41:25 +0200 |
commit | 5a7924678ac8af99e6cd58edc3f5cb3342253038 (patch) | |
tree | eae5570019647cdcfdacf70e6f232783c13471b3 /engines | |
parent | 8c3e63e47139c4ff168e93b105297e7f8f669016 (diff) | |
download | scummvm-rg350-5a7924678ac8af99e6cd58edc3f5cb3342253038.tar.gz scummvm-rg350-5a7924678ac8af99e6cd58edc3f5cb3342253038.tar.bz2 scummvm-rg350-5a7924678ac8af99e6cd58edc3f5cb3342253038.zip |
CGE2: Further implement Hero's functions.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/cge2/hero.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/engines/cge2/hero.cpp b/engines/cge2/hero.cpp index 5ebce6ef4f..601e289528 100644 --- a/engines/cge2/hero.cpp +++ b/engines/cge2/hero.cpp @@ -298,14 +298,6 @@ void Hero::fun() { warning("STUB: Hero::fun()"); } -void Hero::operator ++ () { - warning("STUB: Hero::operator ++()"); -} - -void Hero::operator -- () { - warning("STUB: Hero::operator --()"); -} - int Hero::len(V2D v) { return ((v.x * v.x + v.y * v.y) * (v.x * v.x + v.y * v.y)); } @@ -450,7 +442,18 @@ int CGE2Engine::mapCross(const V2D &a, const V2D &b) { } void Hero::setCave(int c) { - warning("STUB: Hero::setCave()"); + _scene = c; + resetFun(); +} + +void Hero::operator++() { + if (_curDim > 0) + _ext->_shpList = _dim[--_curDim]; +} + +void Hero::operator--() { + if (_curDim < kDimMax - 1) + _ext->_shpList = _dim[++_curDim]; } bool Sprite::works(Sprite *spr) { |