X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fswfc.c;h=19a53c7b38c83344c4183855f29a8836687e004c;hb=918a290574399a88456bbc70d7064c04ab8f6819;hp=34de7f8c5d9c77ac9e4a8a0c2f937fc4a1de5017;hpb=ca5a320f4761e8761019c36684e773fb2f263e68;p=swftools.git diff --git a/src/swfc.c b/src/swfc.c index 34de7f8..19a53c7 100644 --- a/src/swfc.c +++ b/src/swfc.c @@ -609,15 +609,15 @@ void s_swf(const char*name, SRECT r, int version, int fps, int compress, RGBA ba swf->compressed = compress; swf_SetRGB(tag,&background); - dict_init(&characters); - dict_init(&images); - dict_init(&textures); - dict_init(&outlines); - dict_init(&gradients); - dict_init(&filters); - dict_init(&instances); - dict_init(&sounds); - dict_init(&interpolations); + dict_init(&characters, 16); + dict_init(&images, 16); + dict_init(&textures, 16); + dict_init(&outlines, 16); + dict_init(&gradients, 16); + dict_init(&filters, 16); + dict_init(&instances, 16); + dict_init(&sounds, 16); + dict_init(&interpolations, 16); initBuiltIns(); cleanUp = &freeDictionaries; @@ -660,7 +660,7 @@ void s_sprite(const char*name, SRECT*scalegrid) } /* FIXME: those four fields should be bundled together */ - dict_init(&instances); + dict_init(&instances, 16); currentframe = 0; currentdepth = 1; memset(¤trect, 0, sizeof(currentrect)); @@ -3116,7 +3116,7 @@ static int c_define(map_t*args) const char*value = lu(args, "value"); if(!defines_initialized) { - dict_init(&defines); + dict_init(&defines, 16); mem_init(&define_values); defines_initialized = 1; } @@ -3131,7 +3131,7 @@ static int c_point(map_t*args) int pos; SPOINT p; if(!points_initialized) { - dict_init(&points); + dict_init(&points, 16); mem_init(&mpoints); points_initialized = 1; } @@ -4422,9 +4422,10 @@ static void analyseArgumentsForCommand(char*command) else { SWFFONT* font = dict_lookup(&fonts, lu(&args, "font")); - if (!font) - syntaxerror("font %s is not known in line %d", lu(&args, "font"), line); - else + if (!font) { + //that's ok... it might be an edittext with a system font + //syntaxerror("font %s is not known in line %d", lu(&args, "font"), line); + } else if (font->use && !font->use->glyphs_specified) { if (!strcmp(command, "edittext")) @@ -4468,7 +4469,7 @@ void firstPass() { pos = 0; id = 0; - dict_init(&fonts); + dict_init(&fonts, 16); cleanUp = &freeFontDictionary; findFontUsage(); }