From 31a2ab95aa5cfcf8aaa59c7d4e98536cefd7a08d Mon Sep 17 00:00:00 2001 From: yoya Date: Tue, 22 Mar 2011 09:30:23 +0000 Subject: [PATCH] =?utf8?q?author:=20yoya=20depth=20=E3=81=AE=E4=B8=A6?= =?utf8?q?=E3=81=B3=E6=9B=BF=E3=81=88=E5=87=A6=E7=90=86=E3=82=92=E5=89=8A?= =?utf8?q?=E9=99=A4=20(sprite=20=E3=81=AE=E4=B8=AD=E3=81=A7=E4=B8=80?= =?utf8?q?=E6=84=8F=E3=81=A7=E3=81=82=E3=82=8C=E3=81=B0=E8=89=AF=E3=81=95?= =?utf8?q?=E3=81=9D=E3=81=86=E3=81=AA=E3=81=AE=E3=81=A7)?= 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@446 7c90b180-03d5-4157-b861-58a559ae9d1e --- src/swf_object.c | 79 -------------------------------------------------------- 1 file changed, 79 deletions(-) diff --git a/src/swf_object.c b/src/swf_object.c index f2d2afb..8f3adb0 100644 --- a/src/swf_object.c +++ b/src/swf_object.c @@ -22,7 +22,6 @@ #include "bitmap_util.h" #include "trans_table.h" -// #define SWF_OBJECT_DEPTH_RENUMBER // depth の並び替えを行うか否か // #define SWF_OBJECT_UNUSED_CID_PURGE // 不要な CID の削除 swf_object_t * @@ -886,68 +885,6 @@ swf_object_insert_action_setvariables(swf_object_t *swf, return 0; // SUCCESS } - -#ifdef SWF_OBJECT_DEPTH_RENUMBER -/* - * 利用している全 depth 値を取得する。 - */ -static void -trans_table_reserve_place_depth_recursive(swf_tag_t *tag, trans_table_t *depth_trans_table) { - for (; tag ; tag=tag->next) { - int tag_no = tag->tag; - if (isPlaceTag(tag_no)) { - swf_tag_place_detail_t *tag_place; - tag_place = swf_tag_create_input_detail(tag, NULL); - if (tag_place == NULL) { - fprintf(stderr, "trans_table_reserve_place_depth_recursive: tag_place swf_tag_create_input_detail failed\n"); - continue; // skip wrong place tag; - } - trans_table_set(depth_trans_table, tag_place->depth, TRANS_TABLE_RESERVE_ID); - } else if (isSpriteTag(tag_no)) { - swf_tag_sprite_detail_t *tag_sprite; - tag_sprite = swf_tag_create_input_detail(tag, NULL); - if (tag_sprite == NULL) { - fprintf(stderr, "trans_table_reserve_place_depth_recursive: tag_sprite swf_tag_create_input_detail failed\n"); - continue; // skip wrong sprite tag - } - trans_table_reserve_place_depth_recursive(tag_sprite->tag, depth_trans_table); - } - } -} - -/* - * depth 値を入れ替える - */ -static void -trans_table_replace_place_depth_recursive(swf_tag_t *tag, trans_table_t *depth_trans_table) { - for ( ; tag ; tag=tag->next) { - int tag_no = tag->tag; - if (isPlaceTag(tag_no)) { - swf_tag_place_detail_t *tag_place; - int depth; - tag_place = swf_tag_create_input_detail(tag, NULL); - if (tag_place == NULL) { - fprintf(stderr, "trans_table_replace_place_depth_recursive: tag_place swf_tag_create_input_detail failed"); - continue; // skip wrong place tag - - } - depth = tag_place->depth; - tag_place = tag->detail; - } else if (isSpriteTag(tag_no)) { - swf_tag_sprite_detail_t *tag_sprite; - tag_sprite = swf_tag_create_input_detail(tag, NULL); - if (tag_sprite == NULL) { - fprintf(stderr, "trans_table_replace_place_depth_recursive: tag_sprite swf_tag_create_input_detail failed"); - continue; // skip wrong sprite tag - } - trans_table_reserve_place_depth_recursive(tag_sprite->tag, depth_trans_table); - } - } -} - -#endif // SWF_OBJECT_DEPTH_RENUMBER - - #ifdef SWF_OBJECT_UNUSED_CID_PURGE /* @@ -1021,9 +958,6 @@ swf_object_replace_movieclip(swf_object_t *swf, #ifdef SWF_OBJECT_UNUSED_CID_PURGE trans_table_t *orig_sprite_refcid_trans_table = NULL; #endif // SWF_OBJECT_UNUSED_CID_PURGE -#ifdef SWF_OBJECT_DEPTH_RENUMBER - trans_table_t *depth_trans_table = NULL; -#endif // SWF_OBJECT_DEPTH_RENUMBER if (swf == NULL) { fprintf(stderr, "swf_object_replace_movieclip: swf == NULL\n"); return 1; @@ -1115,10 +1049,6 @@ swf_object_replace_movieclip(swf_object_t *swf, // #endif // SWF_OBJECT_UNUSED_CID_PURGE -#ifdef SWF_OBJECT_DEPTH_RENUMBER - depth_trans_table = trans_table_open(); -#endif // SWF_OBJECT_DEPTH_RENUMBER - // 既存の CID cid_trans_table = trans_table_open(); for (tag=swf->tag ; tag ; tag=tag->next) { @@ -1143,10 +1073,6 @@ swf_object_replace_movieclip(swf_object_t *swf, swf_tag_sprite = sprite_tag->detail; swf_tag_sprite->sprite_id = sprite_cid; -#ifdef SWF_OBJECT_DEPTH_RENUMBER - // 既存の DEPTH をチェックする - trans_table_reserve_place_depth_recursive(swf->tag, depth_trans_table); -#endif // SWF_OBJECT_DEPTH_RENUMBER // SWF 中のタグを種類に応じて展開する for (tag=swf4sprite->tag ; tag ; tag=tag->next) { int tag_no = tag->tag; @@ -1272,11 +1198,6 @@ swf_object_replace_movieclip(swf_object_t *swf, break; } } -#ifdef SWF_OBJECT_DEPTH_RENUMBER - // Sprite の depth 値入れ替え - trans_table_replace_place_depth_recursive(swf_tag_sprite->tag, depth_trans_table); - trans_table_close(depth_trans_table); -#endif // SWF_OBJECT_DEPTH_RENUMBER trans_table_close(cid_trans_table); #ifdef SWF_OBJECT_UNUSED_CID_PURGE trans_table_close(orig_sprite_refcid_trans_table); -- 2.11.0