diff options
author | uruk | 2014-05-24 08:57:55 +0200 |
---|---|---|
committer | uruk | 2014-05-24 08:57:55 +0200 |
commit | 0566d095bbb6bc02d24b90bb3e7ac3b1bf42561b (patch) | |
tree | be926adbe4eb84f2aee57d59877e6d62a4709175 | |
parent | eb800807849989fc44f85ec2113520e868c4f7a8 (diff) | |
download | scummvm-rg350-0566d095bbb6bc02d24b90bb3e7ac3b1bf42561b.tar.gz scummvm-rg350-0566d095bbb6bc02d24b90bb3e7ac3b1bf42561b.tar.bz2 scummvm-rg350-0566d095bbb6bc02d24b90bb3e7ac3b1bf42561b.zip |
CGE2: Partially implement Sprite::step().
-rw-r--r-- | engines/cge2/vga13h.cpp | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/engines/cge2/vga13h.cpp b/engines/cge2/vga13h.cpp index 662ea4495e..14bf97bbc4 100644 --- a/engines/cge2/vga13h.cpp +++ b/engines/cge2/vga13h.cpp @@ -455,7 +455,35 @@ void Sprite::backShow(void) { } void Sprite::step(int nr) { - warning("STUB: Sprite::step()"); + if (nr >= 0) + _seqPtr = nr; + + if (_ext) { + V3D p = _pos3D; + Seq *seq; + + if (nr < 0) + _seqPtr = _ext->_seq[_seqPtr]._next; + + if (_file[2] == '~') { // FLY-type sprite + warning("STUB: Sprite::step() - FLY-type sprite"); + } else { + seq = _ext->_seq + _seqPtr; + if (seq->_dz == 127 && seq->_dx != 0) { + _vm->_commandHandlerTurbo->addCommand(kCmdSound, -1, 256 * seq->_dy + seq->_dx, this); + } else { + p._x += seq->_dx; + p._y += seq->_dy; + p._z += seq->_dz; + //if (!_flags._kept) + // gotoxyz(p); + warning("Sprite::step()"); + } + } + if (seq->_dly >= 0) + _time = seq->_dly; + } else if (_vm->_waitRef && _vm->_waitRef == _ref) + _vm->_waitRef = 0; } void Sprite::tick() { |