Skip to content

Commit

Permalink
CGE2: Reimplement Vga::show().
Browse files Browse the repository at this point in the history
  • Loading branch information
uruk committed May 31, 2014
1 parent 7e8923f commit 8289871
Showing 1 changed file with 31 additions and 3 deletions.
34 changes: 31 additions & 3 deletions engines/cge2/vga13h.cpp
Expand Up @@ -957,13 +957,41 @@ void Vga::sunset() {
}

void Vga::show() {
for (Sprite *spr = _showQ->first(); spr; spr = spr->_next)
_vm->_infoLine->update();

for (Sprite *spr = _showQ->first(); spr; spr = spr->_next) {
spr->show();
}

//_vm->_mouse->show();
update();
for (Sprite *spr = _showQ->first(); spr; spr = spr->_next)

for (Sprite *spr = _showQ->first(); spr; spr = spr->_next) {
spr->hide();
if (spr->_flags._zmov) {
Sprite *s = nullptr;
Sprite *p = spr->_prev;
Sprite *n = spr->_next;

if (spr->_flags._shad) {
s = p;
p = s->_prev;
}

_frmCnt++;
if ((p && spr->_pos3D._z > p->_pos3D._z) ||
(n && spr->_pos3D._z < n->_pos3D._z)) {
_showQ->insert(_showQ->remove(spr));
if (s) {
//s->gotoxyz(V3D(s->_pos3D._x, s->_pos3D._y, spr->_pos3D._z));
//_showQ->insert(_showQ->remove(s), spr);
// These two lines are also commented out in the original.
}
}
spr->_flags._zmov = false;
}
}
//_vm->_mouse->hide();
warning("STUB: Vga::show() - Mouse handling is missing!");
}

void Vga::updateColors() {
Expand Down

0 comments on commit 8289871

Please sign in to comment.