From 002094e26ad835ffb99b3c2d12d2f21eff99f339 Mon Sep 17 00:00:00 2001 From: yoya Date: Tue, 8 Mar 2011 00:43:59 +0000 Subject: [PATCH] =?utf8?q?-=20End=E3=82=BF=E3=82=B0=E3=82=92Sprite?= =?utf8?q?=E5=86=85=E3=81=AB=E5=9F=8B=E3=82=81=E3=82=8B=E5=87=A6=E7=90=86?= =?utf8?q?=E3=82=92=E3=81=A4=E3=81=84=E3=81=8B=20-=20PlaceObject2=20?= =?utf8?q?=E3=81=AE=20refcid=20=E3=82=92=E4=B8=8A=E6=9B=B8=E3=81=8D?= =?utf8?q?=E3=81=99=E3=82=8B=E5=87=A6=E7=90=86=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/swfed/trunk@397 7c90b180-03d5-4157-b861-58a559ae9d1e --- src/swf_object.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/swf_object.c b/src/swf_object.c index 6a27713..380b3e0 100644 --- a/src/swf_object.c +++ b/src/swf_object.c @@ -934,7 +934,6 @@ swf_object_replace_movieclip(swf_object_t *swf, switch (tag_no) { // tag skip default: // misc - case 0: // End case 3: // FreeCharacter case 9: // SetBackgroundColor // 16 missing @@ -985,7 +984,9 @@ swf_object_replace_movieclip(swf_object_t *swf, trans_table_set(cid_trans_table, cid, cid); to_cid = cid; } - swf_tag_replace_cid(tag, to_cid); + if (cid != to_cid) { + swf_tag_replace_cid(tag, to_cid); + } } if (isShapeTag(tag_no)) { int bitmap_id = swf_tag_shape_bitmap_get_refcid(tag); @@ -1002,6 +1003,7 @@ swf_object_replace_movieclip(swf_object_t *swf, prev_sprite_tag->next = sprite_tag; break; // Control Tag + case 0: // End case 1: // ShowFrame case 4: // PlaceObject case 5: // RemoveObject @@ -1014,8 +1016,14 @@ swf_object_replace_movieclip(swf_object_t *swf, // Sprite の中に挿入 // TODO: Character ID の変更に追随 switch (tag_no) { + int refcid, to_refcid; case 26: // PlaceObject2 - + refcid = swf_tag_get_refcid(tag); + to_refcid = trans_table_get(cid_trans_table, refcid); + if (refcid != to_refcid) { + swf_tag_replace_refcid(tag, to_refcid); + } + break; } // TODO: 変数スコープ if (sprite_tag_tail == NULL) { -- 2.11.0