CCB * ParseCel (void *inBuf, long inBufSize)
LoadCel()
and you need to parse the cels in the buffer. If the buffer contains more than one cel, the CCBs are strung together via their ccb_NextPtr fields in the same order as they are encountered in the buffer. This allows you to store a group of related cels in one file, and treat them as a single logical entity using the other CelUtils library functions that work with lists of cels.
This function also contains special handling for anti-aliased cels. AACels are two cels stored together in the same file, but the CCBs are stored in reverse order of the way they must be drawn. AACels are recognized by a characteristic signature (exactly two cels, one is 4-bit coded the other 16-bit uncoded, same size and coordinates, etc.), and when detected the CCB links are automatically reversed so the return value is a list of two cels linked in the proper order for drawing. One drawback to the signature-detection logic is that it prevents the storage of multiple related anti-aliased cels in the same file.
LoadCel