From: kramm Date: Fri, 27 Jul 2007 20:13:13 +0000 (+0000) Subject: several fixes to Huub's patch X-Git-Tag: buttons-working~602 X-Git-Url: http://git.asbjorn.it/?a=commitdiff_plain;h=b038726a1b933b38d04d10eb1d8f093b07e80b73;p=swftools.git several fixes to Huub's patch --- diff --git a/src/Makefile.in b/src/Makefile.in index 7e67df6..807a6dc 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -37,6 +37,12 @@ font2swf.$(O): font2swf.c $(C) font2swf.c -o $@ swfc.$(O): swfc.c parser.h ../lib/q.h $(C) swfc.c -o $@ +swfc-feedback.$(O): swfc-feedback.c swfc-feedback.h + $(C) swfc-feedback.c -o $@ +swfc-history.$(O): swfc-history.c swfc-history.h + $(C) swfc-history.c -o $@ +swfc-interpolation.$(O): swfc-feedback.c swfc-feedback.h + $(C) swfc-interpolation.c -o $@ parser.$(O): parser.yy.c parser.h ../lib/q.h $(C) parser.yy.c -o $@ @@ -91,8 +97,8 @@ PDF2SWF_OBJ=../lib/librfxswf$(A) ../lib/libpdf$(A) ../lib/devices/arts.$(O) ../l pdf2swf$(E): pdf2swf.$(O) $(PDF2SWF_OBJ) $(LL) pdf2swf.$(O) -o $@ $(PDF2SWF_OBJ) $(LIBS) $(CXXLIBS) $(STRIP) $@ -swfc$(E): parser.$(O) swfc.$(O) ../lib/librfxswf$(A) ../lib/libbase$(A) - $(L) parser.$(O) swfc.$(O) -o $@ ../lib/librfxswf$(A) ../lib/libbase$(A) $(LIBS) +swfc$(E): parser.$(O) swfc.$(O) swfc-feedback.$(O) swfc-history.$(O) swfc-interpolation.$(O) ../lib/librfxswf$(A) ../lib/libbase$(A) + $(L) parser.$(O) swfc.$(O) swfc-feedback.$(O) swfc-history.$(O) swfc-interpolation.$(O) -o $@ ../lib/librfxswf$(A) ../lib/libbase$(A) $(LIBS) $(STRIP) $@ install: diff --git a/src/swfc-feedback.c b/src/swfc-feedback.c index 51e0d91..d4919ea 100644 --- a/src/swfc-feedback.c +++ b/src/swfc-feedback.c @@ -22,7 +22,7 @@ #include #include #include -#include "feedback.h" +#include "swfc-feedback.h" void syntaxerror(char*format, ...) { diff --git a/src/swfc-history.c b/src/swfc-history.c index b7ce399..40f694c 100644 --- a/src/swfc-history.c +++ b/src/swfc-history.c @@ -21,7 +21,7 @@ #include #include -#include "history.h" +#include "swfc-history.h" change_t* change_new(U16 frame, int function, float value, interpolation_t* inter) { diff --git a/src/swfc-history.h b/src/swfc-history.h index 5ced477..00c5be4 100644 --- a/src/swfc-history.h +++ b/src/swfc-history.h @@ -22,11 +22,11 @@ #ifndef __HISTORY_H #define __HISTORY_Y -#include "types.h" -#include "rfxswf.h" -#include "q.h" -#include "feedback.h" -#include "interpolation.h" +#include "../lib/types.h" +#include "../lib/rfxswf.h" +#include "../lib/q.h" +#include "swfc-feedback.h" +#include "swfc-interpolation.h" enum { diff --git a/src/swfc-interpolation.c b/src/swfc-interpolation.c index 17759e7..26c8374 100644 --- a/src/swfc-interpolation.c +++ b/src/swfc-interpolation.c @@ -22,7 +22,7 @@ #include #include #include -#include "interpolation.h" +#include "swfc-interpolation.h" static inline float poly(float fraction, float start, float delta, int degree) { diff --git a/src/swfc.c b/src/swfc.c index f4d55da..16f4b9b 100644 --- a/src/swfc.c +++ b/src/swfc.c @@ -36,8 +36,9 @@ #include "../lib/wav.h" #include "parser.h" #include "../lib/png.h" -#include "../lib/interpolation.h" -#include "../lib/history.h" +#include "swfc-feedback.h" +#include "swfc-interpolation.h" +#include "swfc-history.h" //#define DEBUG static char * outputname = "output.swf"; @@ -1432,13 +1433,13 @@ void s_texture(char*name, char*object, int x, int y, float scalex, float scaley, dictionary_put2(&textures, name, texture); } -void s_font(char*name, char*filename, char *glyphs) +void s_font(char*name, char*filename) { if(dictionary_lookup(&fonts, name)) syntaxerror("font %s defined twice", name); SWFFONT* font; - font = swf_LoadFont(filename, glyphs); + font = swf_LoadFont(filename); if(font == 0) { warning("Couldn't open font file \"%s\"", filename); @@ -3249,17 +3250,7 @@ static int c_font(map_t*args) { char*name = lu(args, "name"); char*filename = lu(args, "filename"); - fontData* usage = getFontData(name); - char* glyphs = usage->glyphs; - if (usage->needsAll) - glyphs = ""; - else - if (usage->notUsed) - { - printf("font %s was defined but not used\n", name); - return 0; - } - s_font(name, filename, glyphs); + s_font(name, filename); return 0; }