From a2dfb3635fbc94f78fb5a3409abf1bd0f6ec7d73 Mon Sep 17 00:00:00 2001 From: uruk Date: Thu, 18 Jul 2013 15:51:46 +0200 Subject: AVALANCHE: Implement/repair multiple functions in Trip. --- engines/avalanche/trip6.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/engines/avalanche/trip6.cpp b/engines/avalanche/trip6.cpp index 5ca587f885..9cf85f2759 100644 --- a/engines/avalanche/trip6.cpp +++ b/engines/avalanche/trip6.cpp @@ -142,7 +142,14 @@ void triptype::original() { } void triptype::andexor() { - warning("STUB: triptype::andexor()"); + + + + if ((vanishifstill) && (ix == 0) && (iy == 0)) + return; + byte picnum = face * a.seq + step + 1; + + _tr->_vm->_graph.drawSprite(_info); } void triptype::turn(byte whichway) { @@ -1255,14 +1262,14 @@ void Trip::call_andexors() { for (int i = 0; i < 5; i++) order[i] = 0; - for (fv = 1; fv <= numtr; fv++) { + for (fv = 0; fv < numtr; fv++) { if (tr[fv].quick && tr[fv].visible) order[fv] = fv; } do { ok = true; - for (fv = 1; fv <= 4; fv++) { + for (fv = 0; fv < 4; fv++) { if (((order[fv] != 0) && (order[fv + 1] != 0)) && (tr[order[fv]].y > tr[order[fv + 1]].y)) { /* Swap them! */ @@ -1274,7 +1281,7 @@ void Trip::call_andexors() { } } while (!ok); - for (fv = 1; fv <= 5; fv++) { + for (fv = 0; fv < 5; fv++) { if (order[fv] > 0) tr[order[fv]].andexor(); } -- cgit v1.2.3