if (FAILED(swf_ShapeNew(s))) return -1;
sh = s[0];
- swf_ResetBitmask(t);
+ swf_ResetReadBits(t);
sh->bits.fill = (U16)swf_GetBits(t,4);
sh->bits.line = (U16)swf_GetBits(t,4);
bitl = 0; end = 0; pos = swf_GetTagPos(t);
l = (s->bitlen+7)/8;
if (t)
- { swf_ResetBitcount(t);
+ { swf_ResetWriteBits(t);
swf_SetBits(t,s->bits.fill,4);
swf_SetBits(t,s->bits.line,4);
swf_SetBlock(t,s->data,l);
- swf_ResetBitcount(t);
+ swf_ResetWriteBits(t);
}
return l+1;
}
int swf_SetShapeBits(TAG * t,SHAPE * s)
{ if ((!t)||(!s)) return -1;
- swf_ResetBitcount(t);
+ swf_ResetWriteBits(t);
swf_SetBits(t,s->bits.fill,4);
swf_SetBits(t,s->bits.line,4);
return 0;
swf_SetBits(t,x,b);
swf_SetBits(t,y,b);
- if (s)
- { s->px = x;
- s->py = y;
- }
return 0;
}
swf_SetBits(t,b,5);
swf_SetBits(t,x,b);
swf_SetBits(t,y,b);
- s->px = x;
- s->py = y;
if (fill0) swf_SetBits(t,fill0,s->bits.fill);
if (fill1) swf_SetBits(t,fill1,s->bits.fill);
int swf_ShapeSetEnd(TAG * t)
{ if (!t) return -1;
swf_SetBits(t,0,6);
- swf_ResetBitcount(t);
+ swf_ResetWriteBits(t);
return 0;
}
swf_SetBits(t,1,1);
swf_SetBits(t,x,b);
swf_SetBits(t,y,b);
- if (s)
- { s->px += x;
- s->py += y;
- }
return 0;
}
swf_SetBits(t, b-2, 4);
swf_SetBits(t,1,2);
swf_SetBits(t,y,b);
- s->py += y;
- }
+ }
else
{ b = swf_CountBits(x,2);
if(b<2)
swf_SetBits(t, b-2, 4);
swf_SetBits(t,0,2);
swf_SetBits(t,x,b);
- s->px += x;
}
return 0;
}
swf_SetBits(t,ax,b);
swf_SetBits(t,ay,b);
- if (s)
- { s->px += x+ax;
- s->py += y+ay;
- }
return 0;
}