Skip to content

Commit

Permalink
CGE2: Partially implement Sprite::step().
Browse files Browse the repository at this point in the history
  • Loading branch information
uruk committed May 24, 2014
1 parent eb80080 commit 0566d09
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion engines/cge2/vga13h.cpp
Expand Up @@ -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() {
Expand Down

0 comments on commit 0566d09

Please sign in to comment.