git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* fixed swf_CopySWF
[swftools.git]
/
src
/
swfc.c
diff --git
a/src/swfc.c
b/src/swfc.c
index
cdb227a
..
57f26f4
100644
(file)
--- a/
src/swfc.c
+++ b/
src/swfc.c
@@
-618,6
+618,7
@@
static void s_endSprite()
currentdepth = stack[stackpos].olddepth;
instances = stack[stackpos].oldinstances;
currentdepth = stack[stackpos].olddepth;
instances = stack[stackpos].oldinstances;
+ tag = swf_InsertTag(tag, ST_SHOWFRAME);
tag = swf_InsertTag(tag, ST_END);
tag = stack[stackpos].tag;
tag = swf_InsertTag(tag, ST_END);
tag = stack[stackpos].tag;
@@
-796,7
+797,7
@@
void s_box(char*name, int width, int height, RGBA color, int linewidth, char*tex
tag = swf_InsertTag(tag, ST_DEFINESHAPE3);
swf_ShapeNew(&s);
if(linewidth)
tag = swf_InsertTag(tag, ST_DEFINESHAPE3);
swf_ShapeNew(&s);
if(linewidth)
- ls1 = swf_ShapeAddLineStyle(s,linewidth,&color);
+ ls1 = swf_ShapeAddLineStyle(s,linewidth>=20?linewidth-20:0,&color);
if(texture)
fs1 = addFillStyle(s, &r2, texture);
if(texture)
fs1 = addFillStyle(s, &r2, texture);
@@
-834,7
+835,7
@@
void s_filled(char*name, char*outlinename, RGBA color, int linewidth, char*textu
tag = swf_InsertTag(tag, ST_DEFINESHAPE3);
swf_ShapeNew(&s);
if(linewidth)
tag = swf_InsertTag(tag, ST_DEFINESHAPE3);
swf_ShapeNew(&s);
if(linewidth)
- ls1 = swf_ShapeAddLineStyle(s,linewidth,&color);
+ ls1 = swf_ShapeAddLineStyle(s,linewidth>=20?linewidth-20:0,&color);
if(texture)
fs1 = addFillStyle(s, &r2, texture);
if(texture)
fs1 = addFillStyle(s, &r2, texture);
@@
-869,7
+870,7
@@
void s_circle(char*name, int r, RGBA color, int linewidth, char*texture)
tag = swf_InsertTag(tag, ST_DEFINESHAPE3);
swf_ShapeNew(&s);
if(linewidth)
tag = swf_InsertTag(tag, ST_DEFINESHAPE3);
swf_ShapeNew(&s);
if(linewidth)
- ls1 = swf_ShapeAddLineStyle(s,linewidth,&color);
+ ls1 = swf_ShapeAddLineStyle(s,linewidth>=20?linewidth-20:0,&color);
if(texture)
fs1 = addFillStyle(s, &r2, texture);
swf_SetU16(tag,id);
if(texture)
fs1 = addFillStyle(s, &r2, texture);
swf_SetU16(tag,id);
@@
-1110,6
+1111,12
@@
void s_sound(char*name, char*filename)
samples = (U16*)wav2.data;
numsamples = wav2.size/2;
free(wav.data);
samples = (U16*)wav2.data;
numsamples = wav2.size/2;
free(wav.data);
+#ifdef WORDS_BIGENDIAN
+ /* swap bytes */
+ for(t=0;t<numsamples;t++) {
+ samples[t] = (samples[t]>>8)&0xff | (samples[t]<<8)&0xff00;
+ }
+#endif
}
tag = swf_InsertTag(tag, ST_DEFINESOUND);
}
tag = swf_InsertTag(tag, ST_DEFINESOUND);
@@
-1637,8
+1644,8
@@
int parseTwip(char*str)
if(*s<'0' || *s>'9')
syntaxerror("Not a coordinate: \"%s\"", str);
}
if(*s<'0' || *s>'9')
syntaxerror("Not a coordinate: \"%s\"", str);
}
- if(l>2 || (l==2 && (dot[1]!='0' || dot[1]!='5'))) {
- warning("precision loss: %s converted to twip", str);
+ if(l>2 || (l==2 && (dot[1]!='0' && dot[1]!='5'))) {
+ warning("precision loss: %s converted to twip: %s", str, dot);
dot[2] = 0;
l=2;
}
dot[2] = 0;
l=2;
}