git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added item
[swftools.git]
/
lib
/
modules
/
swfshape.c
diff --git
a/lib/modules/swfshape.c
b/lib/modules/swfshape.c
index
c09f30d
..
dbd6c56
100644
(file)
--- a/
lib/modules/swfshape.c
+++ b/
lib/modules/swfshape.c
@@
-438,6
+438,7
@@
int ShapeSetAll(LPTAG t,LPSHAPE s,S32 x,S32 y,U16 line,U16 fill0,U16 fill1)
int ShapeSetEnd(LPTAG t)
\r
{ if (!t) return -1;
\r
SetBits(t,0,6);
\r
int ShapeSetEnd(LPTAG t)
\r
{ if (!t) return -1;
\r
SetBits(t,0,6);
\r
+ ResetBitcount(t);
\r
return 0;
\r
}
\r
\r
return 0;
\r
}
\r
\r
@@
-446,10
+447,12
@@
int ShapeSetLine(LPTAG t,LPSHAPE s,S32 x,S32 y)
if (!t) return -1;
\r
SetBits(t,3,2); // Straight Edge
\r
\r
if (!t) return -1;
\r
SetBits(t,3,2); // Straight Edge
\r
\r
- if ((!s)||(s->px!=x)||(s->py!=y))
\r
+ if ((!s)||((x!=0)&&(y!=0)))
\r
{ b = CountBits(x,2);
\r
b = CountBits(y,b);
\r
{ b = CountBits(x,2);
\r
b = CountBits(y,b);
\r
- SetBits(t,b-2,4);
\r
+ if(b<2)
\r
+ b=2;
\r
+ SetBits(t, b-2, 4);
\r
SetBits(t,1,1);
\r
SetBits(t,x,b);
\r
SetBits(t,y,b);
\r
SetBits(t,1,1);
\r
SetBits(t,x,b);
\r
SetBits(t,y,b);
\r
@@
-460,16
+463,20
@@
int ShapeSetLine(LPTAG t,LPSHAPE s,S32 x,S32 y)
return 0;
\r
}
\r
\r
return 0;
\r
}
\r
\r
- if (s->px==x)
\r
+ if (x==0)
\r
{ b = CountBits(y,2);
\r
{ b = CountBits(y,2);
\r
- SetBits(t,b-2,4);
\r
+ if(b<2)
\r
+ b=2;
\r
+ SetBits(t, b-2, 4);
\r
SetBits(t,1,2);
\r
SetBits(t,y,b);
\r
s->py += y;
\r
}
\r
else
\r
{ b = CountBits(x,2);
\r
SetBits(t,1,2);
\r
SetBits(t,y,b);
\r
s->py += y;
\r
}
\r
else
\r
{ b = CountBits(x,2);
\r
- SetBits(t,b-2,4);
\r
+ if(b<2)
\r
+ b=2;
\r
+ SetBits(t, b-2, 4);
\r
SetBits(t,0,2);
\r
SetBits(t,x,b);
\r
s->px += x;
\r
SetBits(t,0,2);
\r
SetBits(t,x,b);
\r
s->px += x;
\r