#include "game_types.h"

/* Menu_HandleCredits @ 0x080085BC (real 64B) -- sign-chase credit chain, ORing flag into nodes. Mirrors src/matched/Menu_HandleCredits.c. */
/* Chases the credit chain while (anchor ^ cursor) stays negative, ORing b
   into each node's word 10. The loop-back skips to the chain load, not the
   setup -- hence the while shape. */
void Menu_HandleCredits(int *a, int b)
{
    int *anchor = a + 25;
    int *cursor = (int *)a[23];
    while (((int)anchor ^ (int)cursor) < 0) {
        int *node = *(int **)((char *)cursor + 8);
        node[10] |= b;
        cursor = (int *)((int *)cursor)[1];
    }
}
