From 43437e6d749e3a95f6f23a265b399e08f86203ad Mon Sep 17 00:00:00 2001 From: Vincent Hamm Date: Sun, 11 Nov 2007 19:33:25 +0000 Subject: Menu display fix Linked objects implementation (barman) The gameplay is now kind of working and it is possible to play at least the first part of the game svn-id: r29478 --- engines/cruise/cell.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'engines/cruise/cell.cpp') diff --git a/engines/cruise/cell.cpp b/engines/cruise/cell.cpp index 9ef2912ef5..bd86af7884 100644 --- a/engines/cruise/cell.cpp +++ b/engines/cruise/cell.cpp @@ -279,6 +279,21 @@ void removeCell(cellStruct *objPtr, int ovlNumber, int objectIdx, int objType, i } } +void linkCell(cellStruct *pHead, int ovl, int obj, int type, int ovl2, int obj2) { + while (pHead) { + if ((pHead->overlay == ovl) || (ovl == -1)) { + if ((pHead->idx == obj) || (obj == -1)) { + if ((pHead->type == type) || (type == -1)) { + pHead->followObjectIdx = obj2; + pHead->followObjectOverlayIdx = ovl2; + } + } + } + + pHead = pHead->next; + } +} + void freezeCell(cellStruct * pObject, int overlayIdx, int objIdx, int objType, int backgroundPlane, int oldFreeze, int newFreeze ) { while (pObject) { if ((pObject->overlay == overlayIdx) || (overlayIdx == -1)) { -- cgit v1.2.3