several fixes to Huub's patch
authorkramm <kramm>
Fri, 27 Jul 2007 20:13:13 +0000 (20:13 +0000)
committerkramm <kramm>
Fri, 27 Jul 2007 20:13:13 +0000 (20:13 +0000)
src/Makefile.in
src/swfc-feedback.c
src/swfc-history.c
src/swfc-history.h
src/swfc-interpolation.c
src/swfc.c

index 7e67df6..807a6dc 100644 (file)
@@ -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:
index 51e0d91..d4919ea 100644 (file)
@@ -22,7 +22,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdarg.h>
-#include "feedback.h"
+#include "swfc-feedback.h"
 
 void syntaxerror(char*format, ...)
 {
index b7ce399..40f694c 100644 (file)
@@ -21,7 +21,7 @@
 
 #include <stdlib.h>
 #include <memory.h>
-#include "history.h"
+#include "swfc-history.h"
 
 change_t* change_new(U16 frame, int function, float value, interpolation_t* inter)
 {
index 5ced477..00c5be4 100644 (file)
 #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
 {
index 17759e7..26c8374 100644 (file)
@@ -22,7 +22,7 @@
 #include <stdlib.h>
 #include <math.h>
 #include <memory.h>
-#include "interpolation.h"
+#include "swfc-interpolation.h"
 
 static inline float poly(float fraction, float start, float delta, int degree)
 {
index f4d55da..16f4b9b 100644 (file)
@@ -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;
 }