- clipdepth = 0;
- while(lf) {
- if(lc && (!lf || lc->p->depth < lf->p->depth)) {
- l = lc;
- lc = lc->next;
- } else if(lf && (!lc || lf->p->depth < lc->p->depth)) {
- l = lf;
- lf = lf->next;
- } else if(lf && lc && lf->p->depth == lc->p->depth) {
- /* A clipshape and a fillshape at the same depth. Yuck.
- Bug in the SWF file */
- fprintf(stderr, "Error: Multiple use of depth %d in SWF\n", lf->p->depth);
- l = lc;
- lc = lc->next;
- } else {
- fprintf(stderr, "Internal error: %08x %08x\n", lc, lf);
- if(lc) fprintf(stderr, " lc->depth = %08x\n", lc->p->depth);
- if(lf) fprintf(stderr, " lf->depth = %08x\n", lf->p->depth);
- }
-
- if(l->p->depth <= clipdepth) {
- if(DEBUG&2) printf("(clipped)");
- continue;
- }
- if(l->fillid < 0 /*clip*/) {
- if(DEBUG&2) printf("(add clip %d)", l->clipdepth);
- if(l->clipdepth > clipdepth)
- clipdepth = l->clipdepth;
- } else if(l->fillid == 0) {