X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fswfc.c;h=d2ef74dd839b030aebe2ea8ad92d54c58ad56341;hb=fa5261996137bb920a4d97dd25f72e0cfa4930aa;hp=25e047dd06ab623477265329d3502fb3d6d5edf3;hpb=c7b2e91106fdcf40f65b8a45e0e746ad7f5ca131;p=swftools.git diff --git a/src/swfc.c b/src/swfc.c index 25e047d..d2ef74d 100644 --- a/src/swfc.c +++ b/src/swfc.c @@ -441,7 +441,7 @@ static void s_endSWF() swf->movieSize.ymax += 20; } - fi = open(filename, O_WRONLY|O_CREAT|O_TRUNC, 0644); + fi = open(filename, O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, 0644); if(fi<0) { syntaxerror("couldn't create output file %s", filename); } @@ -712,7 +712,7 @@ void s_playsound(char*name, int loops, int nomultiple, int stop) memset(&info, 0, sizeof(info)); info.stop = stop; info.loops = loops; - info.multiple = !nomultiple; + info.nomultiple = nomultiple; swf_SetSoundInfo(tag, &info); } @@ -1332,8 +1332,13 @@ static int c_play(map_t*args) char*name = lu(args, "sound"); char*loop = lu(args, "loop"); char*nomultiple = lu(args, "nomultiple"); + int nm = 0; + if(!strcmp(nomultiple, "nomultiple")) + nm = 1; + else + nm = parseInt(nomultiple); - s_playsound(name, parseInt(loop), parseInt(nomultiple), 0); + s_playsound(name, parseInt(loop), nm, 0); return 0; }