#include "game_types.h"

/* Sub_080047AC @ 0x080047AC (real 26B) -- walks the +140 chain looking for q. Mirrors src/matched/Sub_080047AC.c. */
/* Walks the linked chain at offset +140; returns 1 when q is found, 0 at
   the chain end. */
int Sub_080047AC(int *p, int *q)
{
    for (;;) {
        p = *(int **)((char *)p + 140);
        if (p == 0)
            return 0;
        if (p == q)
            return 1;
    }
}
