ChainCelsAtHead
Chains together lists of cels.
Synopsis
CCB * ChainCelsAtHead (CCB *existingCels, CCB *newCels)
Description
Chains together two lists of cels, putting the new list ahead of the existing cels. The return value is a pointer to the first cel in the resulting list. Either pointer can be NULL, eliminating the need for special-case code when iteratively building a list of cels.
For example, the following code will work:
CCB *list = NULL;
CCB *cels;
do { cels = get_next_antialiased_cel();
list = ChainCelsAtHead(list, cels); }
while (cels != NULL);
This function works properly with anti-aliased cels and similar constructs where a list of related cels makes up a single logical entity.
Arguments
- existingCels
- Pointer to the existing list of cels; may be NULL.
- newCels
- Pointer to the new list of cels to be added ahead of the existing list; may be NULL.
Return Value
Pointer to the head of the resulting list of cels.
Implementation
Library call implemented in lib3do.lib.
Associated Files
lib3do.lib, celutils.h
See Also
ChainCelsAtTail