git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
small bugfix in ttf generator
[swftools.git]
/
lib
/
python
/
tags.c
diff --git
a/lib/python/tags.c
b/lib/python/tags.c
index
3683673
..
2cd47c9
100644
(file)
--- a/
lib/python/tags.c
+++ b/
lib/python/tags.c
@@
-49,7
+49,7
@@
static PyObject* f_DefineFont(PyObject* self, PyObject* args, PyObject* kwargs)
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|s", kwlist, &filename))
return NULL;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|s", kwlist, &filename))
return NULL;
- font = swf_LoadFont(filename);
+ font = swf_LoadFont(filename, 0);
if(!font) {
PyErr_SetString(PyExc_Exception, setError("Could not load %s", filename));
return NULL;
if(!font) {
PyErr_SetString(PyExc_Exception, setError("Could not load %s", filename));
return NULL;
@@
-106,7
+106,7
@@
static int po_parse(tag_internals_t*self)
SWFPLACEOBJECT* swfpo = malloc(sizeof(SWFPLACEOBJECT));
swf_GetPlaceObject(self->tag, swfpo);
i->po = swfpo;
SWFPLACEOBJECT* swfpo = malloc(sizeof(SWFPLACEOBJECT));
swf_GetPlaceObject(self->tag, swfpo);
i->po = swfpo;
- swf_DeleteTag(self->tag);self->tag = 0;
+ swf_DeleteTag(0, self->tag);self->tag = 0;
if(i->po->id) {
i->character = tagmap_id2obj(self->tagmap, i->po->id);
if(i->po->id) {
i->character = tagmap_id2obj(self->tagmap, i->po->id);
@@
-420,7
+420,7
@@
static int sprite_setattr(tag_internals_t*self,char*a, PyObject*obj)
{
sprite_internal_t*si = (sprite_internal_t*)self->data;
if(self->tag) {
{
sprite_internal_t*si = (sprite_internal_t*)self->data;
if(self->tag) {
- swf_DeleteTag(self->tag);
+ swf_DeleteTag(0, self->tag);
self->tag = 0;
}
if(!strcmp(a, "tags")) {
self->tag = 0;
}
if(!strcmp(a, "tags")) {
@@
-573,7
+573,7
@@
static int image_parse(tag_internals_t*self)
i->isindexed = 0;
i->islossless = 1;
i->isindexed = 0;
i->islossless = 1;
- swf_DeleteTag(self->tag);self->tag = 0;
+ swf_DeleteTag(0, self->tag);self->tag = 0;
return 1;
}
static int imagetag_getWidth(PyObject* self)
return 1;
}
static int imagetag_getWidth(PyObject* self)
@@
-637,7
+637,7
@@
static PyObject* image_save(PyObject*self, PyObject*args)
if(!PyArg_ParseTuple(args, "s", &filename))
return NULL;
if(!PyArg_ParseTuple(args, "s", &filename))
return NULL;
- writePNG(filename, fi->rgba ,fi->width, fi->height);
+ writePNG(filename, (unsigned char*)fi->rgba ,fi->width, fi->height);
return PY_NONE;
}
return PY_NONE;
}
@@
-684,7
+684,7
@@
static int shape_parse(tag_internals_t*self)
SHAPE2* shape2 = malloc(sizeof(SHAPE2));
swf_ParseDefineShape(self->tag, shape2);
i->shape2 = shape2;
SHAPE2* shape2 = malloc(sizeof(SHAPE2));
swf_ParseDefineShape(self->tag, shape2);
i->shape2 = shape2;
- swf_DeleteTag(self->tag);self->tag = 0;
+ swf_DeleteTag(0, self->tag);self->tag = 0;
return 1;
}
static void shape_dealloc(tag_internals_t*self)
return 1;
}
static void shape_dealloc(tag_internals_t*self)