aboutsummaryrefslogtreecommitdiff
path: root/engines/cruise/cell.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/cruise/cell.cpp')
-rw-r--r--engines/cruise/cell.cpp15
1 files changed, 15 insertions, 0 deletions
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)) {