git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
0f54ba8
)
swf_DeleteTag now takes two arguments
author
kramm
<kramm>
Sun, 27 Jul 2008 09:37:01 +0000
(09:37 +0000)
committer
kramm
<kramm>
Sun, 27 Jul 2008 09:37:01 +0000
(09:37 +0000)
lib/modules/swfbits.c
patch
|
blob
|
history
lib/modules/swfdraw.c
patch
|
blob
|
history
lib/modules/swfrender.c
patch
|
blob
|
history
lib/modules/swftools.c
patch
|
blob
|
history
lib/python/tag.c
patch
|
blob
|
history
lib/python/taglist.c
patch
|
blob
|
history
lib/python/tags.c
patch
|
blob
|
history
diff --git
a/lib/modules/swfbits.c
b/lib/modules/swfbits.c
index
4510c48
..
220fff4
100644
(file)
--- a/
lib/modules/swfbits.c
+++ b/
lib/modules/swfbits.c
@@
-1185,13
+1185,13
@@
TAG* swf_AddImage(TAG*tag, int bitid, RGBA*mem, int width, int height, int quali
tag1->prev = tag;
if(tag) tag->next = tag1;
tag = tag1;
tag1->prev = tag;
if(tag) tag->next = tag1;
tag = tag1;
- swf_DeleteTag(tag2);
+ swf_DeleteTag(0, tag2);
} else {
/* use the jpeg version- it's smaller */
tag2->prev = tag;
if(tag) tag->next = tag2;
tag = tag2;
} else {
/* use the jpeg version- it's smaller */
tag2->prev = tag;
if(tag) tag->next = tag2;
tag = tag2;
- swf_DeleteTag(tag1);
+ swf_DeleteTag(0, tag1);
}
return tag;
}
}
return tag;
}
@@
-1260,7
+1260,7
@@
void swf_RemoveJPEGTables(SWF * swf)
}
if (swf->firstTag == tables_tag)
swf->firstTag = tables_tag->next;
}
if (swf->firstTag == tables_tag)
swf->firstTag = tables_tag->next;
- swf_DeleteTag(tables_tag);
+ swf_DeleteTag(swf, tables_tag);
}
typedef struct scale_lookup {
}
typedef struct scale_lookup {
diff --git
a/lib/modules/swfdraw.c
b/lib/modules/swfdraw.c
index
c718b18
..
333fdb9
100644
(file)
--- a/
lib/modules/swfdraw.c
+++ b/
lib/modules/swfdraw.c
@@
-179,7
+179,7
@@
static void swf_ShapeDrawerClear(drawer_t*draw)
{
SWFSHAPEDRAWER*sdraw = (SWFSHAPEDRAWER*)draw->internal;
if(sdraw->tagfree) {
{
SWFSHAPEDRAWER*sdraw = (SWFSHAPEDRAWER*)draw->internal;
if(sdraw->tagfree) {
- swf_DeleteTag(sdraw->tag);
+ swf_DeleteTag(0, sdraw->tag);
sdraw->tag = 0;
}
swf_ShapeFree(sdraw->shape);
sdraw->tag = 0;
}
swf_ShapeFree(sdraw->shape);
diff --git
a/lib/modules/swfrender.c
b/lib/modules/swfrender.c
index
9683622
..
8cb04c8
100644
(file)
--- a/
lib/modules/swfrender.c
+++ b/
lib/modules/swfrender.c
@@
-23,6
+23,9
@@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <assert.h>
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "../rfxswf.h"
/* one bit flag: */
#define clip_type 0
/* one bit flag: */
#define clip_type 0
@@
-362,7
+365,7
@@
void swf_Render_Delete(RENDERBUF*dest)
/* delete line buffers */
for(y=0;y<i->height2;y++) {
/* delete line buffers */
for(y=0;y<i->height2;y++) {
- swf_DeleteTag(i->lines[y].points);
+ swf_DeleteTag(0, i->lines[y].points);
i->lines[y].points = 0;
}
i->lines[y].points = 0;
}
diff --git
a/lib/modules/swftools.c
b/lib/modules/swftools.c
index
e7e03f6
..
426ea41
100644
(file)
--- a/
lib/modules/swftools.c
+++ b/
lib/modules/swftools.c
@@
-686,7
+686,7
@@
void enumerateUsedIDs(TAG * tag, int base, void (*callback)(TAG*, int, void*), v
/* I never saw recursive sprites, but they are (theoretically)
possible, so better add base here again */
enumerateUsedIDs(tag2, tag->pos + base, callback, callback_data);
/* I never saw recursive sprites, but they are (theoretically)
possible, so better add base here again */
enumerateUsedIDs(tag2, tag->pos + base, callback, callback_data);
- swf_DeleteTag(tag2);
+ swf_DeleteTag(0, tag2);
swf_GetBlock(tag, NULL, len);
}
}
swf_GetBlock(tag, NULL, len);
}
}
@@
-1268,9
+1268,7
@@
void swf_Optimize(SWF*swf)
/* we found two identical tags- remap one
of them */
remap[id] = swf_GetDefineID(tag2);
/* we found two identical tags- remap one
of them */
remap[id] = swf_GetDefineID(tag2);
- swf_DeleteTag(tag);
- if(tag == swf->firstTag)
- swf->firstTag = next;
+ swf_DeleteTag(swf, tag);
}
} else if(swf_isPseudoDefiningTag(tag)) {
int id = swf_GetDefineID(tag);
}
} else if(swf_isPseudoDefiningTag(tag)) {
int id = swf_GetDefineID(tag);
@@
-1278,9
+1276,7
@@
void swf_Optimize(SWF*swf)
/* if this tag was remapped, we don't
need the helper tag anymore. Discard
it. */
/* if this tag was remapped, we don't
need the helper tag anymore. Discard
it. */
- swf_DeleteTag(tag);
- if(tag == swf->firstTag)
- swf->firstTag = next;
+ swf_DeleteTag(swf, tag);
}
}
}
}
diff --git
a/lib/python/tag.c
b/lib/python/tag.c
index
bae858d
..
f495499
100644
(file)
--- a/
lib/python/tag.c
+++ b/
lib/python/tag.c
@@
-83,7
+83,7
@@
static void tag_dealloc(PyObject * self)
tag->internals.data = 0;
}
if(tag->internals.tag) {
tag->internals.data = 0;
}
if(tag->internals.tag) {
- swf_DeleteTag(tag->internals.tag);
+ swf_DeleteTag(0, tag->internals.tag);
tag->internals.tag = 0;
}
Py_DECREF(tag->internals.tagmap);
tag->internals.tag = 0;
}
Py_DECREF(tag->internals.tagmap);
@@
-229,7
+229,7
@@
static int tag_setattr(PyObject * _self, char* a, PyObject * o)
/* a setattr will almost certainly change the tag data,
so delete the tag */
if(self->internals.tag) {
/* a setattr will almost certainly change the tag data,
so delete the tag */
if(self->internals.tag) {
- swf_DeleteTag(self->internals.tag);
+ swf_DeleteTag(0, self->internals.tag);
self->internals.tag = 0;
}
if(self->internals.setattr) {
self->internals.tag = 0;
}
if(self->internals.setattr) {
diff --git
a/lib/python/taglist.c
b/lib/python/taglist.c
index
f6a0932
..
0a30c08
100644
(file)
--- a/
lib/python/taglist.c
+++ b/
lib/python/taglist.c
@@
-45,7
+45,7
@@
PyObject * taglist_new2(TAG*tag)
while(t) {len++;last=t;t=t->next;}
if(last && last->id==ST_END) {
while(t) {len++;last=t;t=t->next;}
if(last && last->id==ST_END) {
- swf_DeleteTag(last); last = 0;
+ swf_DeleteTag(0, last); last = 0;
len--;
if(len==0) tag = 0;
}
len--;
if(len==0) tag = 0;
}
diff --git
a/lib/python/tags.c
b/lib/python/tags.c
index
0ff6b32
..
7fe35a4
100644
(file)
--- a/
lib/python/tags.c
+++ b/
lib/python/tags.c
@@
-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)
@@
-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)