struct colorsum { unsigned long r, g, b; }; typedef struct node * OCTREE; struct node { unsigned char leaf; unsigned char level; unsigned char colorindex; unsigned char children; unsigned long colorcount; struct colorsum rgbsum; OCTREE nextreduceable; OCTREE next[8]; }; extern OCTREE tree; UINT calc_palette(UINT i, double Cfactor);