#include "game_types.h"

/* Image_DrawMasked @ 0x08012FA4 (real 32B) -- unlinks a node from the doubly-linked image list. Mirrors src/matched/Image_DrawMasked.c. */
/* Unlinks q from the image node list (next +44, prev +48, head link +52):
   two beq share one fall-through but land differently, hence the shape. */
void Image_DrawMasked(int *q)
{
    int *n = (int *)q[11];
    if (n == 0)
        return;
    {
        int *next = (int *)q[13];
        int *prev = (int *)q[12];
        if (prev != 0)
            prev[13] = (int)next;
        else
            n[8] = (int)next;
        if (next != 0)
            next[12] = (int)prev;
    }
    q[11] = 0;
}
